无法安装matplotlib:“在制作共享对象时,无法使用”重定位R_X86_64_32S对''_Py_NotImplementedStruct'“

时间:2016-03-03 12:31:29

标签: python matplotlib python-extensions

virtualenv中的命令pip install matplotlib失败了:

g++ -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro build/temp.linux-x86_64-3.5/src/ft2font.o build/temp.linux-x86_64-3.5/src/ft2font_wrapper.o build/temp.linux-x86_64-3.5/src/mplutils.o -L/usr/local/lib -L/usr/lib -L/usr/lib64 -L/usr/lib -lfreetype -lpython3.5m -o build/lib.linux-x86_64-3.5/matplotlib/ft2font.cpython-35m-x86_64-linux-gnu.so
/usr/bin/ld: /usr/local/lib/libpython3.5m.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/libpython3.5m.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
error: command 'g++' failed with exit status 1

我已经用Google搜索了错误但没有发现任何内容。我是否真的必须下载tarball并更改setup.py中的内容,以便使用-fPIC进行编译?

0 个答案:

没有答案