Importing Issue: "No module named externals" #8332

Closed
zhangty96 opened this Issue Mar 18, 2017 · 2 comments

Comments

Projects
None yet
2 participants

zhangty96 commented Mar 18, 2017 • edited by QuLogic

I tried to uninstall matplotlib on my mac with pip but failed. Now when I try to import matplotlib it will give me this:

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')
Traceback (most recent call last):
  File "/Users/myname/Desktop/Kaggle Stuff/CancerDetection/noduledetection.py", line 7, in <module>
    import matplotlib.pyplot as plt
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/pyplot.py", line 29, in <module>
    import matplotlib.colorbar
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/colorbar.py", line 34, in <module>
    import matplotlib.collections as collections
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/collections.py", line 27, in <module>
    import matplotlib.backend_bases as backend_bases
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backend_bases.py", line 65, in <module>
    import matplotlib.backend_tools as tools
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backend_tools.py", line 20, in <module>
    from matplotlib.externals import six
ImportError: No module named externals

Furthermore, when I try to do pip uninstall, the terminal pops out a very long error message. But when I try to pip install, it tells me that "the requirements are satisfied". I think this was caused by the messy uninstallation but I do not know how to solve this issue.

Thank you!

Contributor

matthew-brett commented Mar 18, 2017

What error message do you get for pip uninstall matplotlib ?

Thank you! I got a series of "[Errno 1] Operation not permitted" errors. But I fixed this problem using sudo pip install matplotlib --upgrade --ignore-installed six. It replaced the previous matplotlib package.

zhangty96 closed this Mar 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment