Reputation: 111
I installed matplotlib using (pip install --user matplotlib) and the installation was successful. when I try to import it using (import matplotlib) in python shell I get this error: Traceback (most recent call last): File "", line 1, in import matplotlib ImportError: No module named matplotlib
I couldn't find another question similar to mine because I'm not using anaconda.
Upvotes: 1
Views: 5022
Reputation: 386
Try pip uninstall matplotlib
then python -mpip install matplotlib
see if it helps. Otherwise, i'd recommend using a virtual environment which you can install using sudo easy_install virtualenv
or pip install virtualenv
This way you could just install and use matplotlib
by following these steps:
user@yourmac$ virtualenv .env
(.env can be any name or directory)user@yourmac$ source .env/bin/activate
pip install matplotlib
and use it to your satisfaction.Hopefully this should solve your problem.
Upvotes: 0