无法安装matplotlib
在64位windows中安装matplotlib时,需要numpy。然后我安装了numpy和matplotlib,然后它说无法安装matplotlib,matplotlib,Matplotlib,在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', '.',
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
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
ImportError:没有名为matplotlib的模块
解决方案可能是什么?如果要从源代码安装Matplotlib,需要以下工具: 内置依赖项
- Python(支持2.x)
- Numpy(>1.1)
- libpng(>1.1)
- FreeType(>1.4)
您可以在PC上搜索FreeType安装,并提供matplotlib的路径,以便它可以找到所需的文件。如果未安装FreeType,您应该这样做,尽管它应该包含在windows安装程序中。softpedia不是mpl二进制文件的“官方”主机,请参阅
从下载并安装matplotlib。它包含了所有依赖项。我在windows的matplotlib安装程序中没有任何“免费类型”文件,也没有从此处下载任何安装文件()解决方案是什么?您能告诉我matplotlib安装程序是从哪里下载的吗?例如,可以在这里找到Freetype for Windows:但是,由于我还没有访问win pc,所以我还无法将其签出。