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
进行编译?