所以我已经连续两天尝试在我的 Mac OS X 10.8 上安装 matplotlib 和 numpy。只是似乎无法让它们启动并运行。我得到各种各样的错误。我终于设法安装了 numpy 1.5,然后当我使用“pip install matplotlib==1.0.1”安装 matplotlib 时,在安装取得一些进展后出现错误:这是错误的最后一部分:
gcc -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -I. -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -Isrc -Iagg24/include -I. -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -I/opt/local/include/freetype2 -I/opt/local/include -I. -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c CXX/IndirectPythonInterface.cxx -o build/temp.macosx-10.5-intel-2.7/CXX/IndirectPythonInterface.o
gcc -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -I. -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -Isrc -Iagg24/include -I. -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -I/opt/local/include/freetype2 -I/opt/local/include -I. -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c CXX/cxxextensions.c -o build/temp.macosx-10.5-intel-2.7/CXX/cxxextensions.o
gcc -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -I. -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -Isrc -Iagg24/include -I. -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -I/opt/local/include/freetype2 -I/opt/local/include -I. -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/backend_agg.cpp -o build/temp.macosx-10.5-intel-2.7/src/backend_agg.o
In file included from src/backend_agg.cpp:9:
In file included from src/_backend_agg.h:32:
agg24/include/agg_renderer_outline_aa.h:1368:45: error: binding of reference to type 'agg::line_profile_aa' to a value of type 'const agg::line_profile_aa' drops qualifiers
line_profile_aa& profile() { return *m_profile; }
^~~~~~~~~~
1 error generated.
error: command 'gcc' failed with exit status 1
当我在终端中输入“gcc”时,它运行良好。我安装了 XCode 5 和命令行工具。有谁知道如何解决这一问题?