By mdivk

2018-10-10 18:45:15 8 Comments

Despite the fact that there are lots of discussions on this topic, I am not able to find a true solution to activate any new environments created using either regular methods, or yml with conda.

I am using Anaconda 4.4.10

I created an environment as below, using the following two methods mentioned in the official document

conda create --name myenv


conda env create -f environment.yml

Now I have two new env: py36 and rxie-env:

$ conda env list
py36 /home/hadoopuser/.conda/envs/py36
rxie-env /home/hadoopuser/.conda/envs/rxie-env
base * /opt/cloudera/parcels/Anaconda

with conda activate I got the following error:

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'. If your shell is Bash or a Bourne variant, enable conda for the current user with

$ echo ". /opt/cloudera/parcels/Anaconda/etc/profile.d/" >> ~/.bashrc

or, for all users, enable conda with

$ sudo ln -s /opt/cloudera/parcels/Anaconda/etc/profile.d/ /etc/profile.d/

The options above will permanently enable the 'conda' command, but they do NOT put conda's base (root) environment on PATH. To do so, run

$ conda activate in your terminal, or to put the base environment on PATH permanently, run

$ echo "conda activate" >> ~/.bashrc

Previous to conda 4.4, the recommended way to activate conda was to modify PATH in your ~/.bashrc file. You should manually remove the line that looks like ........... export PATH="/opt/cloudera/parcels/Anaconda/bin:$PATH"

^^^ The above line should NO LONGER be in your ~/.bashrc file! ^^^

However, by following the given instruction I did the following:

  1. echo "conda activate" >> ~/.bashrc

  2. source ~/.bashrc (not mentioned in the prompt but I think it is needed)

  3. remove export PATH="/opt/cloudera/parcels/Anaconda/bin:$PATH"

    Now I have another new error below:

-bash: /home/jhelmus/workspace/misc/cdh_parcel/anaconda/scripts/parcel/tmp/Anaconda-5.1.0/bin/conda: No such file or directory

As you can see the error points to the conda developer jhelmus's home directory.


Who can tell me what is the right secret command to get the new env activated?

Thank you very much.


@mdivk 2018-10-13 16:56:23

so the answer is this version of Anaconda has bug, upgrade to higher version resolved this issue.

Related Questions

Sponsored Content

17 Answered Questions

[SOLVED] Conda environments not showing up in Jupyter Notebook

12 Answered Questions

[SOLVED] What is the difference between pip and conda?

3 Answered Questions

[SOLVED] conda environment in google colab [google-colaboratory]

4 Answered Questions

[SOLVED] Makefile can't use `conda activate`

1 Answered Questions

Activate Anaconda from a bash script?

1 Answered Questions

1 Answered Questions

How to transfer a conda environment to an off-line computer

1 Answered Questions

ImportError: No module named conda.cli.main while setting up conda

1 Answered Questions

[SOLVED] Conda example does not work, it shows newer not older numpy?

Sponsored Content