The command pip install matplotlib
in a virtualenv fails with:
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
I already googled the error and found nothing. Do I really have to download the tarball and change something in setup.py
to make it compile with -fPIC
?