Home > other >  Why isn't Anaconda working inside of one of my Conda environments while using Ubuntu LTS?
Why isn't Anaconda working inside of one of my Conda environments while using Ubuntu LTS?

Time:01-21

I'm not sure why I can't get Anaconda to launch while I'm inside of one of my Conda environments; I'm using Ubuntu LTS. While I'm in the base environment, I can run the following command in my terminal and Anaconda will start up just fine.

anaconda-navigator

I also set up a Conda environment with specifications for a specific version of python and specific versions of libraries in a .yml file; conda was able to download and install everything successfully. When I run the below command in my terminal, I can see that the environment changes.

conda active {environment name}

My problem is that when I try to start up anaconda while inside of this new environment I get a command not found message.

How do I fix this error?

CodePudding user response:

This is the intended behavior - anaconda-navigator is only meant to be launched from base environment. When base is not active, only the condabin/ directory from the base environment is still retained on $PATH. If you really want to launch Anaconda Navigator from other environments, you could try creating a symlink/softlink pointing at the base bin/anaconda-navigator, e.g.,

conda activate base
cd $CONDA_PREFIX
ln -s bin/anaconda-navigator condabin/anaconda-navigator

However, this is non-standard and may lead to unexpected behavior.

Otherwise, you would need to install anaconda-navigator in each environment, which I don't think is recommended.

  • Related