Matplotlib 构建问题:错误 C1083:无法打开包含文件:'ft2build.h' [英] Matplotlib Build Problem: Error C1083: Cannot open include file: 'ft2build.h'
问题描述
ft2build.h 位于此处:
C:Program FilesGnuWin32include
最初,我犯了和这里一样的错误:
Initially, I made the same mistake as here:
致命错误 C1083:无法打开包含文件:'tiffio.h':没有那个文件或目录 VC++ 2008
但从那以后,我更正了那个特定的错误(我已将上述目录添加到包含"列表中,而不是可执行文件"列表中),但我仍然收到错误消息.完整的输出是这样的:
but since then, I've corrected that particular error (I've added the above directory to the "include" list, rather than the "executables" list), but I still get an error. The complete output is this:
BUILDING MATPLOTLIB
matplotlib: 0.98.5.2
python: 2.6.2 Stackless 3.1b3 060516 (release26-maint, Apr
14 2009, 21:19:36) [MSC v.1500 32 bit (Intel)]
platform: win32
Windows version: (5, 1, 2600, 2, 'Service Pack 3')
REQUIRED DEPENDENCIES
numpy: 1.3.0
freetype2: found, but unknown version (no pkg-config)
* WARNING: Could not find 'freetype2' headers in any
* of '.', '.freetype2'.
OPTIONAL BACKEND DEPENDENCIES
libpng: found, but unknown version (no pkg-config)
* Could not find 'libpng' headers in any of '.'
Tkinter: no
* No tk/win32 support for this python version yet
wxPython: 2.8.9.2
* WxAgg extension not required for wxPython >= 2.8
Gtk+: no
* Building for Gtk+ requires pygtk; you must be able
* to "import gtk" in your build/install environment
Mac OS X native: no
Qt: no
Qt4: no
Cairo: no
OPTIONAL DATE/TIMEZONE DEPENDENCIES
datetime: present, version unknown
dateutil: matplotlib will provide
pytz: matplotlib will provide
OPTIONAL USETEX DEPENDENCIES
dvipng: no
ghostscript: no
latex: no
pdftops: no
[Edit setup.cfg to suppress the above messages]
============================================================================
pymods ['pylab']
packages ['matplotlib', 'matplotlib.backends', 'matplotlib.projections', 'mpl_to
olkits', 'matplotlib.numerix', 'matplotlib.numerix.mlab', 'matplotlib.numerix.ma
', 'matplotlib.numerix.npyma', 'matplotlib.numerix.linear_algebra', 'matplotlib.
numerix.random_array', 'matplotlib.numerix.fft', 'matplotlib.delaunay', 'pytz',
'dateutil', 'dateutil/zoneinfo']
running build
running build_py
copying libmatplotlibmpl-datamatplotlibrc -> buildlib.win32-2.6matplotlibm
pl-data
copying libmatplotlibmpl-datamatplotlib.conf -> buildlib.win32-2.6matplotli
bmpl-data
running build_ext
building 'matplotlib.ft2font' extension
C:Program FilesMicrosoft Visual Studio 9.0VCBINcl.exe /c /nologo /Ox /MD /W
3 /GS- /DNDEBUG -IC:Python26libsite-packages
umpycoreinclude -I. -IC:Pyth
on26libsite-packages
umpycoreincludefreetype2 -I.freetype2 -IC:Python26
include -IC:Python26includeStackless -IC:Python26PC /Tpsrc/ft2font.cpp /Fob
uild emp.win32-2.6Releasesrc/ft2font.obj
ft2font.cpp
C:Program FilesMicrosoft Visual Studio 9.0VCINCLUDExlocale(342) : warning C
4530: C++ exception handler used, but unwind semantics are not enabled. Specify
/EHsc
c:python26libsite-packagesmatplotlib-0.98.5.2srcft2font.h(13) : fatal erro
r C1083: Cannot open include file: 'ft2build.h': No such file or directory
error: command '"C:Program FilesMicrosoft Visual Studio 9.0VCBINcl.exe"' fa
iled with exit status 2
我应该提到这是 Python 2.6
I should mention that this is Python 2.6
推荐答案
您是否正确安装了 freetype?如果有的话,安装目录下应该有一个名为 ft2build.h
的文件,该文件所在的目录就是你应该用 -I
.字符串GnuWin32"没有出现在构建命令的输出中的任何位置,因此您似乎没有将该目录放入正确的包含列表中.
Have you installed freetype properly? If you have, there should be a file named ft2build.h
somewhere under the installation directory, and the directory where that file is found is the one that you should specify with -I
. The string "GnuWin32" does not appear anywhere in the output of your build command, so it looks like you have not placed that directory in the correct include list.
这篇关于Matplotlib 构建问题:错误 C1083:无法打开包含文件:'ft2build.h'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!