Conda environment is discoverable but not activateable (when activate is a bash alias)
Make the source
part of the alias:
alias activatepy3='source /home/user/anaconda3/bin/activate'
Now active:
activatepy3 molr-py3
Do the same for deactivate
.
Comments
-
ely almost 2 years
Conda version 4.2.9, from the anaconda3 4.2.0 installation for RedHat 4.4.7-1.
[user@machine]$ conda info --envs # conda environments: # molr-py3 /home/user/anaconda3/envs/molr-py3 root * /home/user/anaconda3 [user@machine]$ source activate molr-py3 CondaEnvironmentNotFoundError: Could not find environment: molr-py3 . You can list all discoverable environments with `conda info --envs`.
I'm not even sure what debugging steps to take in this case. I've verified that
conda
comes from the right anaconda path, etc.I also tried
chmod -R a+rwX
on theenvs
directory and then theanaconda3
directory, but this had no impact.All of the different
conda-*
commands are aliased in .bashrc to point to the versions existing insideanaconda3/bin
, so it's not using anyanaconda2
versions ofconda
stuff. Additionally, theactivate
script fromanaconda3/bin
is aliased toactivate
so it's not using theanaconda2
activate
script either.Output of
conda info
Current conda install: platform : linux-64 conda version : 4.2.9 conda is private : False conda-env version : 4.2.9 conda-build version : 2.0.2 python version : 3.5.2.final.0 requests version : 2.11.1 root environment : /home/user/anaconda3 (writable) default environment : /home/user/anaconda3 envs directories : /home/user/anaconda3/envs package cache : /home/user/anaconda3/pkgs channel URLs : https://repo.continuum.io/pkgs/free/linux-64/ https://repo.continuum.io/pkgs/free/noarch/ https://repo.continuum.io/pkgs/pro/linux-64/ https://repo.continuum.io/pkgs/pro/noarch/ config file : None offline mode : False
Update
If I fully spell out the path to the
anaconda3
activate script, then it works. E.g. the following will work,source /home/user/anaconda3/bin/activate molr-py3
Even though this is set,
[user@machine]$ which activate alias activate='/home/user/anaconda3/bin/activate' ~/anaconda3/bin/activate
the following does not work,
[user@machine]$ source activate molr-py3 CondaEnvironmentNotFoundError: Could not find environment: molr-py3 . You can list all discoverable environments with `conda info --envs`.