簡單升級matplotlib 1.5在OS X 10.11失敗,因爲FreeType的
sudo pip install matplotlib --upgrade
失敗與以下日誌:
Downloading/unpacking matplotlib from https://pypi.python.org/packages/source/m/matplotlib/matplotlib-1.5.0.tar.gz#md5=7952a539418ed77432aa4727409f24cf
Running setup.py egg_info for package matplotlib
============================================================================
Edit setup.cfg to change the build options
BUILDING MATPLOTLIB
matplotlib: yes [1.5.0]
python: yes [2.7.3 |EPD 7.3-2 (64-bit)| (default, Apr 12
2012, 11:14:05) [GCC 4.0.1 (Apple Inc. build
5493)]]
platform: yes [darwin]
REQUIRED DEPENDENCIES AND EXTENSIONS
numpy: yes [version 1.10.1]
dateutil: yes [using dateutil version 2.4.2]
pytz: yes [using pytz version 2015.7]
cycler: yes [cycler was not found. pip will attempt to
install it after matplotlib.]
tornado: yes [using tornado version 2.2]
pyparsing: yes [Your pyparsing contains a bug that will be
monkey-patched by matplotlib. For best results,
upgrade to pyparsing 2.0.1 or later.]
libagg: yes [pkg-config information for 'libagg' could not
be found. Using local copy.]
freetype: no [The C/C++ header for freetype2 (ft2build.h)
could not be found. You may need to install the
development package.]
png: yes [version 1.6.18]
qhull: yes [pkg-config information for 'qhull' could not be
found. Using local copy.]
OPTIONAL SUBPACKAGES
sample_data: yes [installing]
toolkits: yes [installing]
tests: yes [using nose version 1.1.2/mock is required to
run the matplotlib test suite. "setup.py test" will
automatically download it. Install mock to run
matplotlib.test()]
toolkits_tests: yes [using nose version 1.1.2/mock is required to
run the matplotlib test suite. "setup.py test" will
automatically download it. Install mock to run
matplotlib.test()]
OPTIONAL BACKEND EXTENSIONS
macosx: yes [installing, darwin]
qt5agg: no [PyQt5 not found]
qt4agg: yes [installing, Qt: 4.7.3, PySide: 1.1.0; PyQt4 not
found]
gtk3agg: no [Requires pygobject to be installed.]
gtk3cairo: no [Requires cairocffi or pycairo to be installed.]
gtkagg: no [Requires pygtk]
tkagg: yes [installing, version 81008]
wxagg: no [requires wxPython]
gtk: no [Requires pygtk]
agg: yes [installing]
cairo: no [cairocffi or pycairo not found]
windowing: no [Microsoft Windows only]
OPTIONAL LATEX DEPENDENCIES
dvipng: no
ghostscript: yes [version 9.16]
latex: no
pdftops: no
OPTIONAL PACKAGE DATA
dlls: no [skipping due to configuration]
============================================================================
* The following required packages can not be built:
* freetype
Complete output from command python setup.py egg_info:
============================================================================
Edit setup.cfg to change the build options
BUILDING MATPLOTLIB
matplotlib: yes [1.5.0]
python: yes [2.7.3 |EPD 7.3-2 (64-bit)| (default, Apr 12
2012, 11:14:05) [GCC 4.0.1 (Apple Inc. build
5493)]]
platform: yes [darwin]
REQUIRED DEPENDENCIES AND EXTENSIONS
numpy: yes [version 1.10.1]
dateutil: yes [using dateutil version 2.4.2]
pytz: yes [using pytz version 2015.7]
cycler: yes [cycler was not found. pip will attempt to
install it after matplotlib.]
tornado: yes [using tornado version 2.2]
pyparsing: yes [Your pyparsing contains a bug that will be
monkey-patched by matplotlib. For best results,
upgrade to pyparsing 2.0.1 or later.]
libagg: yes [pkg-config information for 'libagg' could not
be found. Using local copy.]
freetype: no [The C/C++ header for freetype2 (ft2build.h)
could not be found. You may need to install the
development package.]
png: yes [version 1.6.18]
qhull: yes [pkg-config information for 'qhull' could not be
found. Using local copy.]
OPTIONAL SUBPACKAGES
sample_data: yes [installing]
toolkits: yes [installing]
tests: yes [using nose version 1.1.2/mock is required to
run the matplotlib test suite. "setup.py test" will
automatically download it. Install mock to run
matplotlib.test()]
toolkits_tests: yes [using nose version 1.1.2/mock is required to
run the matplotlib test suite. "setup.py test" will
automatically download it. Install mock to run
matplotlib.test()]
OPTIONAL BACKEND EXTENSIONS
macosx: yes [installing, darwin]
qt5agg: no [PyQt5 not found]
qt4agg: yes [installing, Qt: 4.7.3, PySide: 1.1.0; PyQt4 not
found]
gtk3agg: no [Requires pygobject to be installed.]
gtk3cairo: no [Requires cairocffi or pycairo to be installed.]
gtkagg: no [Requires pygtk]
tkagg: yes [installing, version 81008]
wxagg: no [requires wxPython]
gtk: no [Requires pygtk]
agg: yes [installing]
cairo: no [cairocffi or pycairo not found]
windowing: no [Microsoft Windows only]
OPTIONAL LATEX DEPENDENCIES
dvipng: no
ghostscript: yes [version 9.16]
latex: no
pdftops: no
OPTIONAL PACKAGE DATA
dlls: no [skipping due to configuration]
============================================================================
* The following required packages can not be built:
* freetype
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build/matplotlib
Storing complete log in /Users/vlad-arisolteanu/.pip/pip.log
同時,
brew install freetype
回報:
Warning: freetype-2.6_1 already installed
所以它看起來像freetype安裝在我的系統上。那麼發生了什麼?令人失望的是,沒有安裝像matplotlib這樣的關鍵Python包。
任何幫助,將不勝感激。
另一方面,找不到'ls -l/usr/include/freetype2/ft2build.h'。 – WindChimes
您是否試圖將matplotlib安裝到系統Python中?這似乎並不像是將它安裝到'brew'管理的Python中。 – birryree
我正在安裝到Enthought(目前設置爲默認的Python解釋器)。 – WindChimes