Cannot activate Conda environment

13,405

Usually you activate an environment by name:

> activate myenv

Mac/Linux users have > source activate. Newer conda versions may use > conda activate.

In your case, what is the name of your environment? You can list existing environments:

> conda env list

If you find an env other than root or base, activate it as mentioned above.

In the future, consider creating environments with a name to easily access later:

> conda create -n myenv ... python=3.6
> activate myenv

Note: ... indicates arbitrary optional flags.

Share:
13,405
FiReTiTi
Author by

FiReTiTi

I am a researcher on Computer Vision (Segmentation, Image Processing, Image Analysis, Pattern Recognition, Image Characterization, Machine/Deep learning) with applications to biology and medicine. I develop in Java, C++, and Python. Publications and research interests: www.thibault.biz

Updated on June 04, 2022

Comments

  • FiReTiTi
    FiReTiTi about 2 years

    I installed miniconda and I created an environment:

    conda create --prefix /path/to/a/directory/Python36 python=3.6
    

    Then I tried to active it:

    conda activate /path/to/a/directory/Python36
    

    But I got this error message:

    CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
    To initialize your shell, run
    $ conda init <SHELL_NAME>
    

    But when I run condo init --all, I nothing changes, everything is already initialized.

    ...
    No action taken.
    

    What am I missing?