我正在尝试matplotlib
在 MacBook Pro 10.8.3 上安装。我所有的科学软件包(python、qgis 和许多其他软件包)都安装了 Homebrew。pip install matplotlib
失败并出现以下错误:
ld: library not found for -lgcc_ext.10.5
collect2: error: ld returned 1 exit status
error: command 'c++' failed with exit status 1
我无法弄清楚这lgcc_ext.10.5
是在寻找什么。我见过其他问题,例如10.8 install failure,但我的错误似乎不同。它发生在pip install
或通过git clone
...安装
Downloading/unpacking matplotlib
Downloading matplotlib-1.2.1.tar.gz (38.4MB): 38.4MB downloaded
Running setup.py egg_info for package matplotlib
basedirlist is: ['/usr/local/', '/usr', '/usr/X11', '/opt/local']
============================================================================
BUILDING MATPLOTLIB
matplotlib: 1.2.1
python: 2.7.5 (default, May 21 2013, 10:35:49) [GCC 4.2.1
Compatible Apple LLVM 4.2 (clang-425.0.24)]
platform: darwin
REQUIRED DEPENDENCIES
numpy: 1.6.2
freetype2: 16.0.10
OPTIONAL BACKEND DEPENDENCIES
libpng: 1.5.14
Tkinter: Tkinter: 81008, Tk: 8.5, Tcl: 8.5
pkg-config: looking for pygtk-2.0 gtk+-2.0
* Package libffi was not found in the pkg-config
* search path. Perhaps you should add the directory
* containing `libffi.pc' to the PKG_CONFIG_PATH
* environment variable Package 'libffi', required by
* 'pygobject-2.0', not found
* You may need to install 'dev' package(s) to
* provide header files.
Gtk+: no
* Could not find Gtk+ headers in any of
* '/usr/local/include', '/usr/include',
* '/usr/X11/include', '/opt/local/include',
* '/usr/local/include', '/usr/include',
* '/usr/X11/include', '.'
Mac OS X native: yes
Qt: no
Qt4: Qt: 4.8.4, PyQt4: 4.10.1
PySide: Qt: 4.8.4, PySide: 1.1.2
Cairo: 1.10.0
OPTIONAL DATE/TIMEZONE DEPENDENCIES
dateutil: matplotlib will provide
pytz: matplotlib will provide
OPTIONAL USETEX DEPENDENCIES
dvipng: 1.14
ghostscript: 9.07
latex: 3.1415926
pdftops: 0.22.4
[Edit setup.cfg to suppress the above messages]
============================================================================
我的完整输出很长,但我收到了一些我不知道相关的警告,例如:
cc -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/X11/include -I/usr/X11/include/freetype2 -I/usr/X11/include/libpng12 -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include -I/usr/X11/include -I/opt/local/include -I/Library/Python/2.7/site-packages/numpy-override/numpy/core/include -I/usr/local/Cellar/freetype/2.4.11/include/freetype2 -I/usr/local/Cellar/freetype/2.4.11/include -I/usr/local/include -I/usr/include -I/usr/X11/include -I. -I/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c CXX/cxxsupport.cxx -o build/temp.macosx-10.8-x86_64-2.7/CXX/cxxsupport.o
In file included from CXX/cxxsupport.cxx:40:
In file included from CXX/Python2/cxxsupport.cxx:38:
In file included from ./CXX/Objects.hxx:40:
./CXX/Python2/Objects.hxx:1133:23: warning: implicit conversion of NULL constant to 'int' [-Wnull-conversion]
, offset( NULL )
~ ^~~~
0