Carlos Gayou
Carlos Gayou

Reputation: 1

Getting started with Matplotlib

I'm trying to learn how to use matplotlib to start replacing Matlab in my life, but I'm having trouble getting started. I added python and pip to my path so i could pip install matplotlib from my command prompt, and I see it's installed in my python\lib\site-packages file, but when I type in "import matplotlib.pyplot as plt" to get started and run the rest of my simple plot code, pycharm says that there is no module named matplotlib. My plot code runs fine on the shell, copied and pasted from the same stuff I'm trying to run in pycharm however. What do I need to do to go this to run in pycharm as well?

Upvotes: 0

Views: 110

Answers (2)

awiebe
awiebe

Reputation: 3836

Pycharm can select between many different python installations on your system, it sounds like you have selected a version different from the one in which you installed matplotlib. You probably installed matplotlib with pip. Check which pip you used by putting which pip if you're under *nix. then check which one Pycharm is using in your project.

Upvotes: 1

ericstevens26101
ericstevens26101

Reputation: 121

Is your pycharm path the same as your terminal path?

import sys
sys.path

Upvotes: 0

Related Questions