Reputation: 2601
I have installed Anaconda 3 and PyCharm Community Edition after that. I am able to chose the interpreter to be a Conda environment. But when I try using certain packages, such as Matplotlib, it throws "Module not found error". When I run pip, it returns saying that matplotlib is available.
pip install matplotlib
Requirement already satisfied: matplotlib in./anaconda3/lib/python3.6/site-packages
Clearly the package is there and for some reason it does not show up.
Upvotes: 24
Views: 39690
Reputation: 1161
With Python 2019.2.3, (CE) there are the following steps on a Windows 10 system:
Go to File → Settings in the menu bar or alternatively press Ctrl + Alt + S
Go to to the entry Project → Project Interpreter
Select Show All in the dropdown menu:
If your Conda Environment is not listed, press the +
button and select Conda Environment on the left:
Now select the desired environment by opening the dropdown menu Interpreter and click OK. Now your Conda environment should be listed as project interpreter. Click OK to close the window and click Apply in the settings window.
Upvotes: 3
Reputation: 1
For me, installing didn't help. It was already there.
pip3 install matplotlib
Requirement already satisfied: matplotlib in /usr/local/lib/python3.7/site-packages (3.0.2)
PyCharm → Preference → Default Interpreter
So, I had to change the default interpreter and then it started working.
Upvotes: 0
Reputation: 1
Go to PyCharm → Preferences → Python Interpreter. Select the Use Conda Package Manager symbol (green circle).
After it refreshes, select the Install (^N) symbol. Search for the installed package
Upvotes: 0
Reputation: 2601
Apparently the naming of the selection depends on the operating system, but the Python interpreter can be selected as follows:
Using the dropdown, select the right Python interpreter. Depending on your OS and setup, this can be the default interpreter (e.g., ~/anaconda3/bin/python
) or the interpreter corresponding to the Conda environment of your choice (e.g., C:\users\username\.conda\envs\projectname\python.exe
).
Now all the packages installed with Anaconda should be listed.
Upvotes: 26