Search code examples
pythonpython-3.xenvironment-variablesanacondamacos-sierra

Anaconda : change environnement error - Python


it's really the first that I need to create second python environment and I need your help!

I have created a new environment with anaconda (on Mac OS 10.12.4). But I can't witch from my basic root environment to the new one.

I am using this code from the documentation :

source activate <myenvname>

PermissionError: [Errno 13] Permission denied: '/Users/anaconda/lib/python3.5/site-packages/llvmlite-0.17.0-py3.5.egg-info/PKG-INFO'

Even I am using 'sudo', it doesn't work...

With the anaconda navigator, I tried to launch the second environment with 'open terminal' but I have the same error.

root environment and the second one

I didn't found a clear answer in internet... :)

All the best,


Solution

  • source is a shell built-in command, it can't be executed without the shell. sudo doesn't run the shell by default. To explicitly execute the shell, use the -s option.

    sudo -s source activate orangecolors
    

    Hope this help.