1. 程式人生 > >macOS python3 matplotlib

macOS python3 matplotlib

pip3 install matplotlib

>>> import matplotlib
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.7/site-packages/matplotlib/__init__.py", line 141, in <module>
    from . import cbook, rcsetup
  File "/usr/local/lib/python3.7/site-packages/matplotlib/rcsetup.py", line 29, in <module>
    from cycler import Cycler, cycler as ccycler
  File "/usr/local/lib/python3.7/site-packages/cycler.py", line 46, in <module>
    import six
ModuleNotFoundError: No module named 'six'
>>> from matplotlib import pyplot as plt
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.7/site-packages/matplotlib/__init__.py", line 141, in <module>
    from . import cbook, rcsetup
  File "/usr/local/lib/python3.7/site-packages/matplotlib/rcsetup.py", line 29, in <module>
    from cycler import Cycler, cycler as ccycler
  File "/usr/local/lib/python3.7/site-packages/cycler.py", line 46, in <module>
    import six
ModuleNotFoundError: No module named 'six'
>>> 

pip3 install scipy

參考:

  1. Python配置matplotlib–no module named six matplotlib