Instalando o Matplotlib no CentOS 6.5

Estou tentando instalar o matplotlib-1.4.0 no CentOS 6.5 com o Python 2.7.8. Eu tentei instalar com pip e de origem. Inicialmente, recebi uma mensagem de erro informando que precisava de uma versão mais recente do Freetype2, que eu instalei (versão 2.5.3) em / usr / local / bin, / usr / local / include e / usr / local / lib. A versão mais antiga do Freetype2 (2.3.11) está em / usr / bin, / usr / include / freetype2 / freetype e / usr / lib.

Agora, quando tento instalar o matplotlib (python setup.py build), parece que os caminhos de inclusão estão todos apontando para a versão errada (antiga) do Freetype2, e não consigo descobrir como alterar os caminhos apropriados para apontar para os mais novos versão do Freetype2. A mensagem de erro real está abaixo e é bastante confusa. Não consegui encontrar muita coisa sobre o erro on-line, mas percebo que o caminho do Freetype2 está errado, então acho que é isso que está causando o problema. Alguma dica?

Encontrei dicas em outros tópicos sobre como adicionar o link simbólico / usr / include / freetype para apontar para / usr / local / include / freetype2, mas isso não ajudou.

building 'matplotlib.ft2font' extension
gcc -pthread -fno-strict-aliasing -O3 -m64 -mfpmath=sse -msse2 -mtune=generic -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_ft2font_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/local/python2/2.7.8/x86_64/gcc46/nonet/lib/python2.7/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -Iextern -I/usr/local/python2/2.7.8/x86_64/gcc46/nonet/include/python2.7 -c src/ft2font.cpp -o build/temp.linux-x86_64-2.7/src/ft2font.o
In file included from /usr/local/python2/2.7.8/x86_64/gcc46/nonet/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1761:0,
                 from /usr/local/python2/2.7.8/x86_64/gcc46/nonet/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17,
                 from src/file_compat.h:7,
                 from src/ft2font.cpp:7:
/usr/local/python2/2.7.8/x86_64/gcc46/nonet/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
In file included from src/ft2font.cpp:7:0:
src/file_compat.h:31:0: warning: "npy_fseek" redefined [enabled by default]
/usr/local/python2/2.7.8/x86_64/gcc46/nonet/lib/python2.7/site-packages/numpy/core/include/numpy/npy_common.h:86:0: note: this is the location of the previous definition
src/file_compat.h:32:0: warning: "npy_ftell" redefined [enabled by default]
/usr/local/python2/2.7.8/x86_64/gcc46/nonet/lib/python2.7/site-packages/numpy/core/include/numpy/npy_common.h:91:0: note: this is the location of the previous definition
src/ft2font.cpp: In member function ‘Py::Object FT2Image::py_write_bitmap(const Py::Tuple&)’:
src/ft2font.cpp:184:15: warning: unused variable ‘offset’ [-Wunused-variable]
gcc -pthread -fno-strict-aliasing -O3 -m64 -mfpmath=sse -msse2 -mtune=generic -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_ft2font_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/local/python2/2.7.8/x86_64/gcc46/nonet/lib/python2.7/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -Iextern -I/usr/local/python2/2.7.8/x86_64/gcc46/nonet/include/python2.7 -c src/mplutils.cpp -o build/temp.linux-x86_64-2.7/src/mplutils.o
In file included from /usr/local/python2/2.7.8/x86_64/gcc46/nonet/include/python2.7/Python.h:8:0,
                 from src/mplutils.h:18,
                 from src/mplutils.cpp:6:
/usr/local/python2/2.7.8/x86_64/gcc46/nonet/include/python2.7/pyconfig.h:1182:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default]
/usr/include/features.h:162:0: note: this is the location of the previous definition
/usr/local/python2/2.7.8/x86_64/gcc46/nonet/include/python2.7/pyconfig.h:1204:0: warning: "_XOPEN_SOURCE" redefined [enabled by default]
/usr/include/features.h:164:0: note: this is the location of the previous definition
gcc -pthread -fno-strict-aliasing -O3 -m64 -mfpmath=sse -msse2 -mtune=generic -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_ft2font_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/local/python2/2.7.8/x86_64/gcc46/nonet/lib/python2.7/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -Iextern -I/usr/local/python2/2.7.8/x86_64/gcc46/nonet/include/python2.7 -c extern/CXX/cxxsupport.cxx -o build/temp.linux-x86_64-2.7/extern/CXX/cxxsupport.o
gcc -pthread -fno-strict-aliasing -O3 -m64 -mfpmath=sse -msse2 -mtune=generic -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_ft2font_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/local/python2/2.7.8/x86_64/gcc46/nonet/lib/python2.7/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -Iextern -I/usr/local/python2/2.7.8/x86_64/gcc46/nonet/include/python2.7 -c extern/CXX/cxx_extensions.cxx -o build/temp.linux-x86_64-2.7/extern/CXX/cxx_extensions.o
gcc -pthread -fno-strict-aliasing -O3 -m64 -mfpmath=sse -msse2 -mtune=generic -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_ft2font_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/local/python2/2.7.8/x86_64/gcc46/nonet/lib/python2.7/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -Iextern -I/usr/local/python2/2.7.8/x86_64/gcc46/nonet/include/python2.7 -c extern/CXX/IndirectPythonInterface.cxx -o build/temp.linux-x86_64-2.7/extern/CXX/IndirectPythonInterface.o
gcc -pthread -fno-strict-aliasing -O3 -m64 -mfpmath=sse -msse2 -mtune=generic -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_ft2font_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/local/python2/2.7.8/x86_64/gcc46/nonet/lib/python2.7/site-packages/numpy/core/include -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. -Iextern -I/usr/local/python2/2.7.8/x86_64/gcc46/nonet/include/python2.7 -c extern/CXX/cxxextensions.c -o build/temp.linux-x86_64-2.7/extern/CXX/cxxextensions.o
g++ -pthread -shared build/temp.linux-x86_64-2.7/src/ft2font.o build/temp.linux-x86_64-2.7/src/mplutils.o build/temp.linux-x86_64-2.7/extern/CXX/cxxsupport.o build/temp.linux-x86_64-2.7/extern/CXX/cxx_extensions.o build/temp.linux-x86_64-2.7/extern/CXX/IndirectPythonInterface.o build/temp.linux-x86_64-2.7/extern/CXX/cxxextensions.o -L/usr/local/lib -L/usr/local/lib64 -L/usr/lib -L/usr/lib64 -L/usr/local/python2/2.7.8/x86_64/gcc46/nonet/lib -lfreetype -lstdc++ -lm -lpython2.7 -o build/lib.linux-x86_64-2.7/matplotlib/ft2font.so
/usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32S against `_Py_NotImplementedStruct' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libpython2.7.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
error: command 'g++' failed with exit status 1  

questionAnswers(4)

yourAnswerToTheQuestion