0

I have looked at other articles, but I have not been able to correct this. I am fairly new to Python. My problem:

import matplotlib.pyplot

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-64-6f467123fe04> in <module>()
----> 1 import matplotlib.pyplot

ImportError: No module named pyplot
---------------------------------------------------------------------------

Some more info: I am running Jupyter Notebook on OSX, but when I load Python from Terminal I also receive the same error.

which -a python
/Users/user/anaconda/bin/python
/usr/bin/python

which -a jupyter
/Users/user/anaconda/bin/jupyter
/usr/local/bin/jupyter

sys.path
['',
 '/Users/user/anaconda/lib/python27.zip',
 '/Users/user/anaconda/lib/python2.7',
 '/Users/user/anaconda/lib/python2.7/plat-darwin',
 '/Users/user/anaconda/lib/python2.7/plat-mac',
 '/Users/user/anaconda/lib/python2.7/plat-mac/lib-scriptpackages',
 '/Users/user/anaconda/lib/python2.7/lib-tk',
 '/Users/user/anaconda/lib/python2.7/lib-old',
 '/Users/user/anaconda/lib/python2.7/lib-dynload',
 '/Users/user/anaconda/lib/python2.7/site-packages/runipy-0.1.1-py2.7.egg',
 '/Users/user/anaconda/lib/python2.7/site-packages/setuptools-20.7.0-py2.7.egg',
 '/Users/user/anaconda/lib/python2.7/site-packages',
 '/Users/user/anaconda/lib/python2.7/site-packages/PIL',
 '/Users/user/anaconda/lib/python2.7/site-packages/Sphinx-1.2.3-py2.7.egg',
 '/Users/user/anaconda/lib/python2.7/site-packages/IPython/extensions',
 '/Users/user/.ipython']
user45254
  • 362
  • 3
  • 13
  • Did you try to install matplotlib by hand? `conda install -c anaconda matplotlib=1.5.3 ` – Michael Gecht Oct 12 '16 at 15:50
  • @mischi I just tried to do that after you suggested it, and received another error: ImportError: cannot import name unpack_labeled_data – user45254 Oct 12 '16 at 16:04
  • @mischi I tried pip uninstalling matplotlib twice, and then just conda installing it, and received the same error as before, namely, ImportError: No module named pyplot – user45254 Oct 12 '16 at 16:12
  • Doing a quick Google search also provides [this](http://stackoverflow.com/questions/32680081/importerror-after-successful-pip-installation/32680082#32680082). – Michael Gecht Oct 12 '16 at 19:24

0 Answers0