所以我一直試圖在Mac OS X 10.8上安裝matplotlib和numpy兩天。只是似乎無法讓他們運轉起來。我得到各種各樣的錯誤。我終於設法安裝numpy的1.5,那麼當我安裝matplotlib與「PIP安裝matplotlib == 1.0.1」,我以後通過安裝一些進展得到一個錯誤:這是錯誤的最後一部分:在OS X上安裝Numpy和matplotlib 10.8.5
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和命令行工具。有誰知道如何解決這一問題?
您是否嘗試過使用包管理器,如[macports](https://www.macports.org/)或[homebrew](http://brew.sh/)? – askewchan