Matplotlib not recognized as a module when importing in Python -
i've been attempting install matplotlib graphing project in python. in accordance recommendation matplotlib website, installed anaconda pre-packaged python distributor. anaconda seems have installed correctly. install matplotlib, typed in command line:
pip install matplotlib
which brings multiple messages stating: "requirement satisfied." when in python script typed:
import matplotlib.pyplot plt
i received error message stating:
importerror: no module named matplotlib.pyplot
i'm using old windows xp operating system.
i've looked everywhere help, , have tried installing matplotlib numerous times via command line! appreciated... thank you!!
make sure version of pip corresponds version of python. 1 way following:
python -m pip install matplotlib
the -m module means in site-packages python pip module.
you can do:
>>> import sys >>> print("\n".join(sys.path))
to list path understood python, check whether matplotlib indeed on 1 of listed paths (usually site-packages).
to find locations of pip , python use following on windows console:
where python pip
from path should able determine whether pip , python same package. if not, uninstall 1 of python installations, or @ least remove path variable.