Help on Mac: Shell script to change environment and run code

I’ve installed Open Interpreter (GitHub - KillianLucas/open-interpreter: A natural language interface for computers) in an anaconda environment on my Mac.

I can manually activate the environment and start it.

I’m trying to create a shell script that automates this but I’m getting errors that seem to indicate that the environment isn’t being loaded; I’ve also tried several variations but couldn’t get any to work.

This is the code

#!/bin/bash
export PATH=/Users/j/anaconda3/bin:/Users/j/anaconda3/condabin:$PATH
conda activate oi
interpreter -y

This is the error

usage: conda [-h] [–no-plugins] [-V] COMMAND …
conda: error: argument COMMAND: invalid choice: ‘activate’ (choose from ‘clean’, ‘compare’, ‘config’, ‘create’, ‘info’, ‘init’, ‘install’, ‘list’, ‘notices’, ‘package’, ‘remove’, ‘uninstall’, ‘rename’, ‘run’, ‘search’, ‘update’, ‘upgrade’, ‘build’, ‘content-trust’, ‘convert’, ‘debug’, ‘develop’, ‘doctor’, ‘index’, ‘inspect’, ‘metapackage’, ‘render’, ‘skeleton’, ‘pack’, ‘env’, ‘verify’, ‘token’, ‘server’, ‘repo’)
./start_interpreter.sh: line 11: interpreter: command not found

Help!