[英]matplotlib ImportError: cannot import name 'style'
Windows 10, install python 3.5, pip install matplotlib. Windows 10,安装python 3.5,pip install matplotlib。
import matplotlib as mlt
mlt.__version__
'1.5.1'
import matplotlib.pyplot as plt
I get following error traceback: 我得到以下错误追溯:
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
import matplotlib.pyplot as plt
File "C:\Python35\lib\site-packages\matplotlib\pyplot.py", line 30, in <module>
from matplotlib import style
ImportError: cannot import name 'style'
I think this is probably due to the way you installed matplotlib. 我想这可能是由于你安装matplotlib的方式。 In my experience
pip install matplotlib
does not work. 根据我的经验,
pip install matplotlib
不起作用。
I would try the Windows installer from https://pypi.python.org/pypi/matplotlib . 我会尝试从https://pypi.python.org/pypi/matplotlib获取Windows安装程序。 There are both 32-bit and 64-bit builds for Python 3.5 version there.
那里有Python 3.5版本的32位和64位版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.