FiReTiTi
FiReTiTi

Reputation: 5898

Miniconda: issue with shell configuration/initialization

I installed miniconda on our CentOS cluster and it all went fine. Then I asked miniconda to create a python 3.8 environment, and it went fine. However, when I try to activate the environment, I get the following error:

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run

$ conda init <SHELL_NAME>

I verified, and it's a bash environment. So I ran conda init bash and I got the following outputs:

no change     /MyPath/miniconda3/condabin/conda
no change     /MyPath/miniconda3/bin/conda
no change     /MyPath/miniconda3/bin/conda-env
no change     /MyPath/miniconda3/bin/activate
no change     /MyPath/miniconda3/bin/deactivate
no change     /MyPath/miniconda3/etc/profile.d/conda.sh
no change     /MyPath/miniconda3/etc/fish/conf.d/conda.fish
no change     /MyPath/miniconda3/shell/condabin/Conda.psm1
no change     /MyPath/miniconda3/shell/condabin/conda-hook.ps1
no change     /MyPath/miniconda3/lib/python3.9/site-packages/xontrib/conda.xsh
no change     /MyPath/miniconda3/etc/profile.d/conda.csh
no change     /home/users/me/.bashrc
No action taken.

So nothing happens. And when I try to activate the new environment, then I still get the first error.

Any idea how I can fix this?

[Solution] Thanks to the answer below, the issue was that despite testing that I was running/using a bash, I still have to run "bash" in the command line before activating model.

Upvotes: 0

Views: 937

Answers (1)

Amey
Amey

Reputation: 480

have you tried manually adding to ~/.bashrc?

  • add export PATH="/home/username/miniconda/bin:$PATH" in your bashrc file. make sure to replace /home/username/miniconda with your actual path now save the file, quit and reopen the terminal should work I guess.

Upvotes: 1

Related Questions