问题描述
- 在python 2.7shell中出现如下错误
-
import matplotlib
import matplotlib.pyplot as pltTraceback (most recent call last):
File "", line 1, in
import matplotlib.pyplot as plt
File "C:Python27libsite-packagesmatplotlibpyplot.py", line 29, in
from matplotlib.figure import Figure, figaspect
File "C:Python27libsite-packagesmatplotlibfigure.py", line 36, in
from matplotlib.axes import Axes, SubplotBase, subplot_class_factory
File "C:Python27libsite-packagesmatplotlibaxes.py", line 20, in
import matplotlib.dates as _ # <-registers a date unit converter
File "C:Python27libsite-packagesmatplotlibdates.py", line 119, in
from dateutil.rrule import (rrule, MO, TU, WE, TH, FR, SA, SU, YEARLY,
File "C:Python27libdateutilrrule.py", line 16, in
from six.moves import _thread
ImportError: cannot import name _thread
解决方案
这个模块没有装好吧?
解决方案二:
ImportError: cannot import name _thread
模块没有安装,重新安装下,或者安装好的模块没有放对位置,看看当前使用的python使用的lib位置。
解决方案三:
把这个卸了,再重新安一遍