Vedant Bansal
Vedant Bansal

Reputation: 11

How do I install libraries in PyCharm?

I installed matpotlib library through cmd using pip install matplotlib. The library works fine in IDLE but I am not able to import it in PyCharm. I tried installing the library in Pycharm directly but it showed an error.I have attached an image of error it shows while installing through pycharm.

Upvotes: 0

Views: 3232

Answers (1)

Nandu Raj
Nandu Raj

Reputation: 2110

While starting a project, PyCharm creates a new virtual environment for each project, else mentioned. You install matplotlib in the general environment, so not present in this environment.

Try taking PyCharm's terminal instead of installing from searching available packages. It will be in the virtual environment of the project. And pip install matplotlib.

Else start the project using a virtual environment you have already created where you have installed matplotlib

Upvotes: 2

Related Questions