当我在 64 位 Windows 中安装 matplotlib 时,它需要 numpy。然后我安装了 numpy 并再次安装了 matplotlib 然后它说
numpy: 1.7.1
freetype2: found, but unknown version (no pkg-config)
* WARNING: Could not find 'freetype2' headers in any
* of 'win32_static\include', '.',
* 'win32_static\include\freetype2', '.\freetype2'.
我在 python 中尝试过
import numpy
没有错误
但是当我尝试
import matplotlib
显示错误
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named matplotlib
可能的解决方案是什么?
最佳答案
softpedia 不是 mpl 二进制文件的“官方”主机,请参阅 http://matplotlib.org/downloads.html
下载matplotlib
来自 here并安装它。它包含了所有依赖项。
关于matplotlib - 无法安装 matplotlib,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16101289/