I have a conda virtual environment where I run code for voice processing.
I want to write a script so that I can open a shell in this virtual environment to listen for commands. I can launch the virtual environment from a shell using conda activate chatting
but when I try to make this into a script, I get this error:
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run
$ conda init <SHELL_NAME>
so I added conda init bash to my script:
#!/bin/bash
#conda init bash
#source activate chatting
#conda activate chatting
eval $(conda shell.bash hook)
source activate chatting
conda activate chatting
bash -i
#conda activate chatting
But it still gives me the same error. How can I make a script the activate my conda virtual environment?
I do see some similar questions here, but none of the recommended solutions solve the problem.
conda activate not working in a bash file
Activating conda environment in "startup applications" script