I have been using conda for a few months. The following is the version that I'm using:

conda -V
conda 4.5.4

Previously, to activate or to deactivate the conda environment, I think I have used the following command:

source activate [env_name]
source deactivate

However, recently, the above commands don't work on my machine for unknown reason. The following is the result:

bash: activate: No such file or directory

More strangely, the following commands work:

conda activate [env_name]
conda deactivate

Could you suggest what might have happened and how to fix this problem?


The problem may be because the Anaconda directory is not part of your PATH. You can check this by entering the following command in your terminal. If you don't see the Anaconda directory(Looks something like this /home/user/anaconda3/bin), you found your issue!

echo $PATH

To fix this problem, you can simply enter the following command in the terminal where user is your username.

export PATH="/home/user/anaconda3/bin:$PATH"

If this helped, please mark this as an accepted answer so that your original question can be marked as solved!


This behavior is since 4.4 version. Take a look at this page.

Conda 4.4 introduced new scripts that make activation behavior uniform across operating systems. Where you once had “source activate envname” on unix, and just “activate envname” on windows, Conda 4.4 allowed “conda activate envname”.

You can read more on 4.4 changes here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.