0

This thing was working a couple of weeks ago, now it's got some module dependency error ... my path is the same, my Python is the same ... or is it ? How do I know ? Where should I look ?

< ... some call stack ... >
  File "C:\Python27\lib\site-packages\matplotlib\pyplot.py", line 29, in <module>
    from matplotlib.figure import Figure, figaspect
  File "C:\Python27\lib\site-packages\matplotlib\figure.py", line 36, in <module>
    from matplotlib.axes import Axes, SubplotBase, subplot_class_factory
  File "C:\Python27\lib\site-packages\matplotlib\axes\__init__.py", line 4, in <module>
    from ._subplots import *
  File "C:\Python27\lib\site-packages\matplotlib\axes\_subplots.py", line 10, in <module>
    from matplotlib.axes._axes import Axes
  File "C:\Python27\lib\site-packages\matplotlib\axes\_axes.py", line 17, in <module>
    from matplotlib.cbook import _string_to_bool, mplDeprecation
ImportError: cannot import name _string_to_bool

FYI, I do have the six module installed in the right place (C:\Python27\lib\site-packages), as shown by the fact that the command

pip install six

returns

Requirement already satisfied (use --upgrade to upgrade): six in c:\python27\lib\site-packages
Charles
  • 988
  • 1
  • 11
  • 28
  • ... except I'm not using Pycharm but just running Python from the command line ... – Charles Jan 17 '18 at 14:34
  • 1
    Have you tried what the answer in that question suggests? The title of that question makes it seem like it's a Pycharm error when it is not – DavidG Jan 17 '18 at 14:35
  • Yes. I have about a million billion copies of this "six" module which never caused any problems until this day. The copy I believe is relevant is the one located in C:\Python27\Lib\site-packages. You will notice the capital L in Lib : this is how it is spelled in my Windows browser. On the command line it is a lowercase l ('ell'), yet the P of Python is uppercase in the command line, showing that it isn't the command line (or the script internally) that changes the case here. Plus Windows is supposed to be case insensitive is it not ? It did find matplotlib in the first place after all ... – Charles Jan 17 '18 at 15:32
  • Ran " pip install --upgrade matplotlib " and things resumed working as normal – Charles Jan 17 '18 at 15:55

0 Answers0