Search code examples
pythonpycharmanaconda

How can I access different Anaconda environment from Pycharm (on Windows 10)


I have installed anaconda with python 3.5, and created a new environment with Python 2.7 (on windows 10).

I can easily change the Anaconda environment with the command line tool. However in Pycharm, when I try to change the Python interpreter, I can only see the Anaconda Python 3.5 version.

Is there a easy way to select the Anaconda environment from Pycharm?


Solution

  • In PyCharm you can add how many interpreter you want. You have to go in

    Settings->Project->Project Interpreter
    

    Here, you should see the current interpreter.
    At the top of the window, there is a list which contains all local interpreters.
    If you find it in the list select it, otherwise, in the right corner of the window, there is a settings icon; press it and press on Add local.
    After this navigate in your computer and select the directory that contains the Anaconda env.

    edit
    As PatriceG suggested in comments, if you already have an Anaconda environment but you don't know where is it or you don't remember, you can check the current position using the following command:

    conda info --envs
    

    Then, you should be able to find and select it.

    Now, you have to add the anconda env to your local interpreter, so you are able to use it.