当我运行时pip install matplotlib
(在 virtualenv 中),输出的第一行是:
Downloading/unpacking matplotlib
Running setup.py egg_info for package matplotlib
basedirlist is: ['/usr/local/', '/usr', '/usr/X11', '/opt/local']
============================================================================
BUILDING MATPLOTLIB
matplotlib: 1.2.0
python: 2.7.3 (default, Dec 14 2012, 13:31:05) [GCC 4.2.1
(Apple Inc. build 5666) (dot 3)]
platform: darwin
REQUIRED DEPENDENCIES
numpy: 1.6.2
freetype2: found, but unknown version (no pkg-config)
OPTIONAL BACKEND DEPENDENCIES
libpng: found, but unknown version (no pkg-config)
Tkinter: Tkinter: 81008, Tk: 8.5, Tcl: 8.5
Gtk+: no
* Building for Gtk+ requires pygtk; you must be able
* to "import gtk" in your build/install environment
Mac OS X native: yes
Qt: no
Qt4: no
PySide: no
Cairo: no
<snip>
笔记
- “没有 pkg-config”,以及
- 缺少的 Qt 库。
首先,与上面的输出相反,pkg-config
实际上已安装并在PATH
:
% pkg-config --version
0.27.1
% which pkg-config
/usr/local/bin/pkg-config
其次,qt
可在同一目录中找到freetype
并libpng
找到:
% ls -l /usr/local/opt/{freetype,libpng,qt} | cut -c43-
/usr/local/opt/freetype -> ../Cellar/freetype/2.4.10/
/usr/local/opt/libpng -> ../Cellar/libpng/1.5.13/
/usr/local/opt/qt -> ../Cellar/qt/4.8.4/
我的问题分为三个部分:
- 从哪里
pip install matplotlib
得到它basedirlist
(上面输出的第 3 行)?- 我必须做些什么不同的事情
pip install matplotlib
才能找到pkg-config
?- 我必须做些什么不同的事情
pip install matplotlib
才能找到qt
?