ImportError:没有名为';matplotlib._cntr';

ImportError:没有名为';matplotlib._cntr';,matplotlib,Matplotlib,当我跑的时候 #!/usr/bin/env python import matplotlib import matplotlib.pyplot as plt 我得到以下错误 Traceback (most recent call last): File "/home/wayne/alphaWorldsPython/code/mapTest.py", line 12, in <module> import matplotlib.pyplot as plt File "/h

当我跑的时候

#!/usr/bin/env python
import matplotlib 
import matplotlib.pyplot as plt
我得到以下错误

Traceback (most recent call last):
File "/home/wayne/alphaWorldsPython/code/mapTest.py", line 12, in <module>
     import matplotlib.pyplot as plt
File "/home/wayne/matplotlib/pyplot.py", line 32, in <module>
    import matplotlib.colorbar
File "/home/wayne/matplotlib/colorbar.py", line 36, in <module>
    import matplotlib.contour as contour
File "/home/wayne/matplotlib/contour.py", line 14, in <module>
    import matplotlib._cntr as _cntr
ImportError: No module named 'matplotlib._cntr'
回溯(最近一次呼叫最后一次):
文件“/home/wayne/alphaWorldsPython/code/mapTest.py”,第12行,在
将matplotlib.pyplot作为plt导入
文件“/home/wayne/matplotlib/pyplot.py”,第32行,在
导入matplotlib.colorbar
文件“/home/wayne/matplotlib/colorbar.py”,第36行,在
将matplotlib.contour导入为等高线
文件“/home/wayne/matplotlib/contour.py”,第14行,在
导入matplotlib.\u cntr作为\u cntr
ImportError:没有名为“matplotlib.\u cntr”的模块
当我查看matplotlib时,确实存在。\ cntr不存在。
我已尝试重新安装和更新。无更改。

\u cntr是一个专用模块,已从matplotlib中删除。您可以将其安装到matplotlib中,使.\u cntr仍然存在

我认为,在任何人都能帮助您之前,您需要添加更多信息。您使用的是什么操作系统,如何安装matplotlib,您使用的是什么版本的python和matplotlib?这种错误通常发生在使用错误的matplotlib版本时,该版本与numpy或python的版本不匹配。例如,如果你有一个32位的python,但是安装了64位的matplotlib二进制文件,或者反之亦然。我使用的是Ubuntu 15.04、python 3.4、Numpy 1.9.2。我首先使用conda安装,然后从gethub克隆,最后使用sudo apt获取install matplotlib。每个都有相同的错误。我知道matplotlib和python 3.4都是64位的。我忘了提到我正在使用matplotlib 2.1.1。我解决了这个问题,但还有一个问题。我删除了matplotlib并将其从git hub中重新放置。git克隆git://github.com/matplotlib/matplotlib.git 新错误是ImportError:没有名为“mpl\U toolkits.basemap”的模块