ImportError:没有名为'matplotlib._cntr'的模块

时间:2018-01-19 21:22:05

标签: 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 "/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'

当我查看matplotlib确实._cntr不存在。 我尝试过重新安装和更新。没有变化。

1 个答案:

答案 0 :(得分:0)

._ cntr是私有模块,已从matplotlib中删除。您可以安装它以在matplotlib中仍然具有._cntr https://github.com/matplotlib/legacycontour

相关问题