Matplotlibの構築:問題エラー C1083:うまくいかないインクルードファイル:'ft2build.h'
-
11-09-2019 - |
質問
ft2build.h があります:
C:\Program ファイルを\GnuWin32\含
当初は、同じ間違いてはこちら
致命的なエラー C1083:うまくいかないインクルードファイル:'tiffio.h:なファイルまたはディレクトリ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
ここではPython2.6
解決
いまでfreetypeが必要ですか?している場合、あるべきという名前のファイル ft2build.h
どこかのインストール先ディレクトリのディレクトリとするファイルが見つからなかったものを指定してくださいと -I
.文字列"GnuWin32"が表示されませんので出力のビルドコマンドしているので、以下のようになれていない配置するディレクトリを正しいなどの一覧です。
他のヒント
このエラーが約がmatplotlib Ubuntu10.10ます。このセクション:
sudo apt-get install python-dev libfreetype6-dev
別の解決のためにMac OS Xで設Freetypeと自作.
brew install freetype
方がいるとともに、同誌掲載号の注目がMac OS10.6(snow leopard)は、Python2.7. した、最も解かれたえていくためのご提案を行っているファイルのダウンロードても済む,scipyとmatplotlib、コンパイルします。カスタマイズすることができますのmakeファイルを取得しまmatplotlibだけます。こちらは リンク るソリューションとなります。
また、同じエラー赤帽子6.がしないといけないというイ freetype-devel
, ない freetype
(使用 sudo yum install freetype-devel
)
また固定したことでこの問題置freetypeを自作Mac OS Xで動作します。しかし、が十分でないため、どの図書館はリンクを適切にMac OS X10.7.何年経っても色あせない素敵な手動で追加し pip
コマンドとして
brew install freetype
brew install libpng
LDFLAGS="-L/usr/local/opt/freetype/lib -L/usr/local/opt/libpng/lib" CPPFLAGS="-I/usr/local/opt/freetype/include -I/usr/local/opt/libpng/include -I/usr/local/opt/freetype/include/freetype2" pip install matplotlib
注意するものではありませんのフォルダ /usr/local/opt/freetype/include/freetype2
, に含まれないデフォルトでは、自作の通知が結果を見定めながら ft2build.h
.
ることができたこれを解決するWindowsの場合、以下の
set INCLUDE=%INCLUDE%;C:\tmp\msvcr90-x32
set LIB=%LIB%;C:\tmp\msvcr90-x32
pip.exe install matplotlib
リンクの図書館のためにFreetype windowsので、できるだけ早く送ってくださ http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib (meawopplのコメント)
でダウンロードしてくださいmatplotlib-1.x-windows-link-libraries.zip"に、ファイルzip.
ダウンロードファイル内のフォルダにCます。Windows CMD迅速かつ管理者としてナビゲートでパスを使用
cd..
または cd wheels
(私の場合は保存されるファイル c:\Wheels
)
その後タイプ pip install YourFilename.whl
結果
Processing c:\wheels\scipy-0.19.0-cp27-cp27m-win_amd64.whl
Requirement already satisfied: numpy>=1.8.2 in c:\python27\lib\site-packages (from scipy==0.19.0)
Installing collected packages: scipy
Successfully installed scipy-0.19.0