python - Matplotlib 构建问题 : Error C1083: Cannot ope

ft2build.h 位于:

C:\Program Files\GnuWin32\include

一开始,我也犯了和这里一样的错误:

Fatal Error C1083: Cannot Open Include file: 'tiffio.h': No such file or directory VC++ 2008

但从那时起,我已经更正了那个特定的错误(我已将上述目录添加到“包含”列表,而不是“可执行文件”列表),但我仍然收到错误。完整的输出是这样的:

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 lib\matplotlib\mpl-data\matplotlibrc -> build\lib.win32-2.6\matplotlib\m
pl-data
copying lib\matplotlib\mpl-data\matplotlib.conf -> build\lib.win32-2.6\matplotli
b\mpl-data
running build_ext
building 'matplotlib.ft2font' extension
C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W
3 /GS- /DNDEBUG -IC:\Python26\lib\site-packages\numpy\core\include -I. -IC:\Pyth
on26\lib\site-packages\numpy\core\include\freetype2 -I.\freetype2 -IC:\Python26\
include -IC:\Python26\include\Stackless -IC:\Python26\PC /Tpsrc/ft2font.cpp /Fob
uild\temp.win32-2.6\Release\src/ft2font.obj
ft2font.cpp
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) : warning C
4530: C++ exception handler used, but unwind semantics are not enabled. Specify
/EHsc
c:\python26\lib\site-packages\matplotlib-0.98.5.2\src\ft2font.h(13) : fatal erro
r C1083: Cannot open include file: 'ft2build.h': No such file or directory
error: command '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' fa
iled with exit status 2

我应该提到这是 Python 2.6

最佳答案

在 Ubuntu 10.10 上构建 matplotlib 时也会出现此错误。解决办法是:

sudo apt-get install python-dev libfreetype6-dev

关于python - Matplotlib 构建问题 : Error C1083: Cannot open include file: 'ft2build.h' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/762292/

相关文章:

git - 为什么我的 TeamCity 构建停止工作?

visual-studio-2010 - 无法使用 devenv 编译 vdproj - 'targ

带有 CLI 的 Angular 2 - 为生产而构建

build - 具有项目编译依赖项的 Gradle 嵌套多项目

groovy - Gradle:强制自定义任务始终运行(无缓存)

build - 在 CentOS/RHEL 上制作和构建实用程序?

visual-studio - Visual Studio : debug information

c++ - 未找到/usr/local/lib 中的库

build - 即使测试失败,Teamcity 也会运行构建步骤

build - 您使用什么工具来构建 Erlang 程序?