我在Windows 7上安装了pythonxy,运行后出现错误
from pylab import *
这似乎来自 matplotlib,连接到 ft2font 模块。我试图通过从 https://pypi.python.org/pypi/matplotlib/1.1.0 下载它来重新安装 matplotlib并运行
python setup.py install
安装中止并显示消息
In file included from src/ft2font.cpp:3:0:
src/ft2font.h:16:22: fatal error: ft2build.h: No such file or directory
#include <ft2build.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
有人可以帮我解决这个问题吗?
编辑:下面的答案可能仍然对某些人有帮助(对我来说,发生了更多错误,最后我安装了 Oracle Virtual Box。现在我在 Virtual Box 中运行 Ubuntu,一切正常:))
最佳答案
您需要为“freetype2”安装开发库,这取决于您如何配置本地环境。
这里有更详细的解释;
http://gnuwin32.sourceforge.net/packages/freetype.htm
http://www.freetype.org/download.html
这里似乎也回答了类似的问题;
Visual studio 2010 no such file
然而,这可能是一个棘手的过程,matplotlib
建议 Windows 用户使用 Python 的“Enthought Edition”,其中预装了许多此类软件包;
http://matplotlib.org/users/installing.html#installing-on-windows
关于python - matplotlib fatal error ft2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22043037/