[英]building matplotlib from source on fedora 19, and found no freetype header files
我已經在fedora 19系統上安裝了matplotlib源程序包,並獲得了以下信息:
============================================================================
Edit setup.cfg to change the build options
BUILDING MATPLOTLIB
matplotlib: yes [1.3.1]
python: yes [2.7.6 (default, Jan 9 2014, 14:24:42) [GCC
4.8.1 20130603 (Red Hat 4.8.1-1)]]`
platform: yes [linux2]
REQUIRED DEPENDENCIES AND EXTENSIONS
numpy: yes [version 1.8.0]
dateutil: yes [dateutil was not found. It is required for date
axis support. pip/easy_install may attempt to
install it after matplotlib.]
tornado: yes [tornado was not found. It is required for the
WebAgg backend. pip/easy_install may attempt to
install it after matplotlib.]
pyparsing: yes [pyparsing was not found. It is required for
mathtext support. pip/easy_install may attempt to
install it after matplotlib.]
pycxx: yes [Couldn't import. Using local copy.]
libagg: yes [pkg-config information for 'libagg' could not
be found. Using local copy.]
freetype: no [The C/C++ header for freetype2 (ftbuild.h)
could not be found. You may need to install the
development package.]
png: yes [pkg-config information for 'libpng' could not
be found. Using unknown version.]
OPTIONAL SUBPACKAGES
sample_data: yes [installing]
toolkits: yes [installing]
tests: yes [using nose version 1.3.0]
OPTIONAL BACKEND EXTENSIONS
macosx: no [Mac OS-X only]
qt4agg: no [PyQt4 not found]
gtk3agg: no [Requires pygobject to be installed.]
gtk3cairo: no [Requires cairo to be installed.]
gtkagg: no [Requires pygtk.]
tkagg: no [TKAgg requires Tkinter.]
wxagg: no [requires wxPython]
gtk: no [The C/C++ header for gtk (gtk/gtk.h) could not
be found. You may need to install the development
package.]
agg: yes [installing]
cairo: no [cairo not found]
windowing: no [Microsoft Windows only]
OPTIONAL LATEX DEPENDENCIES
dvipng: yes [version 1.14]
ghostscript: yes [version 9.07]
latex: no
pdftops: yes [version 0.22.1]
============================================================================
* The following required packages can not be built:
* freetype
但是,在此安裝之前,我已經在默認目錄(即/usr/local
安裝了freetype 2.5.2。 我在/usr/local/include/freetype2
找到了頭文件( ft2build.h
)。 還檢查了setupext.py
,在class FreeType(SetupPackage)
的代碼部分中,有
the default_include_dirs=
['freetype2','lib/freetype2/include','lib/freetype2/include/freetype2',]
現在,我不知道為什么軟件包找不到已安裝的freetype。 有人有想法嗎? 感謝你的幫助!!!
我有完全一樣的問題。 我解決了這個問題,只需在self._check_for_pkg_config()中的setupext.py中用我的ft2build.h的整個路徑(由tcaswell建議)替換ft2build.h即可。
感謝您的所有幫助!
是的,我手動安裝所有這些軟件包,因為我的Linux系統電腦無法連接到互聯網。
在我找到您的答復之前,我已經以間接方式解決了問題;-(,這是我所做的:
由於freetype 2.5.2的devel軟件包對我的fedora 19系統而言並不方便,因此我不得不選擇使用freetype 2.4.11-6及其devel軟件包,現在的依賴關系還可以。 我個人懷疑這是環境路徑設置的問題,但當時我沒有時間對其進行測試。 實際上,freetype 2.5.2的源包已經包含devel子目錄。
順便說一句,matplotlib的手動安裝非常復雜,排除了必備軟件包:libpng和numpy,您仍然需要安裝distribution,backports.ssl_match_hostname,tornado,six,dateutil和pyparsing。 只有在所有這些安裝都結束之后,才能最終將matplotlib安裝在您的系統中。
使用pip install在Windows 7上的cygwin 64上存在相同的問題:在安裝pkg-config后解決。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.