Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 975
PatriceG Avatar asked Jan 20 '17 16:01

PatriceG


People also ask

Can I have both Anaconda and PyCharm?

They work together fine - you just need to set up a run configuration that points to the Anaconda installation. Show activity on this post. My experience with Anaconda was using it for a machine learning learning class. We used jupyter notebook to do all our learning and projects.

Is PyCharm for Anaconda different?

PyCharm and Anaconda are both tools used to aid Python developers. Though they are independent tools, PyCharm and AnaConda can be used together for projects that can benefit from both tools. PyCharm is an IDE built to make it easier to write Python code, by providing a text editor and debugging, among other features.


2 Answers

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.

like image 132
Giordano Avatar answered Oct 04 '22 13:10

Giordano


Go to Setting then Project Interpreter Click on Setting icon which will lead to browse folder, Choose Add Local then on left side of page, click on system Interpreter then Press OK and Apply.

like image 25
Ameer Hamza Avatar answered Oct 04 '22 12:10

Ameer Hamza