Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Conda activate not working?

Tags:

conda

anaconda

 gonzo  ~/a/packages  conda env list # conda environments: # ppo_latest               /nohome/jaan/abhishek/anaconda3/envs/ppo_latest root                  *  /nohome/jaan/abhishek/anaconda3   gonzo  ~/a/packages  conda activate ppo_latest  gonzo  ~/a/packages  which python                                                                                     (ppo_latest) /nohome/jaan/abhishek/anaconda3/bin/python  gonzo  ~/a/packages  conda deactivate                                                                                 (ppo_latest)  gonzo  ~/a/packages  which python /nohome/jaan/abhishek/anaconda3/bin/python 

The environment gets activated without an error. Then we check which python it is referring to it. It is doesn't change, why?

like image 653
Abhishek Bhatia Avatar asked Nov 12 '17 07:11

Abhishek Bhatia


People also ask

How can conda environment be activated?

To activate your Conda environment, type source activate <yourenvironmentname> . Note that conda activate will not work on Discovery with this version. To install a specific package, type conda install -n <yourenvironmentname> [package] . To deactivate the current, active Conda environment, type conda deactivate .

Why does my command prompt not recognize conda?

To Solve 'conda' is not recognized as internal or external command Error First of all you need to check conda installation path. Just Open Anaconda Prompt and type this command: where conda Then Press windows key and type Open Advanced System Settings. Now, Click on Environment Variables. Edit Path variable.

Why is my conda not working?

Environment PATH for Conda is not set – This is the most common cause why this issue occurs. Keep in mind that the latest Anaconda builds will not automatically add Conda to your System variable paths since it can cause various issues with other software.


1 Answers

As of conda 4.4, the command

conda activate <envname> 

is the same on all platforms. The procedure to add conda to the PATH environment variable for non-Windows platforms (on Windows you should use the Anaconda Prompt), as well as the change in environment activation procedure, is detailed in the release notes for conda 4.4.0.


For conda versions older than 4.4, command is either

source activate <envname> 

on Linux and macOS or

activate <envname> 

on Windows. You need to remove the conda.

like image 65
darthbith Avatar answered Oct 16 '22 07:10

darthbith