Pyenv: trouble installing PySide in pyenv virtualenv using pip

Created on 4 Nov 2015  ·  3Comments  ·  Source: pyenv/pyenv

Hi, thanks for a great tool!

As my title suggests, I am having trouble installing PySide in a pyenv virtualenv using pip. Part of the errors I get are

Linking CXX shared library libshiboken-python2.7.so
/usr/bin/ld: /home/demba/.pyenv/versions/2.7.8/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
/home/demba/.pyenv/versions/2.7.8/lib/libpython2.7.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: ** [libshiboken/libshiboken-python2.7.so.1.2.4] Error 1
make[1]: *
* [libshiboken/CMakeFiles/libshiboken.dir/all] Error 2
make: *** [all] Error 2
error: Error compiling shiboken

I am on Ubuntu 14.04.3, 64 bit.

I am able to install PySide fine _outside of a virtualenv_ using pip. Any help would be appreciated. I tried compiling shiboken from source but that did not help.

Thanks,

Demba.

Most helpful comment

It is saying that your binary isn't built with required compiler options. Read some document and rebuild CPython with those options like this; 'env PYTHON_CFLAGS=-fPIC pyenv install -v 2.7.8'

All 3 comments

/usr/bin/ld: /home/demba/.pyenv/versions/2.7.8/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
/home/demba/.pyenv/versions/2.7.8/lib/libpython2.7.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status

read the error message.

Thanks for the prompt response. Can you be more precise?

It is saying that your binary isn't built with required compiler options. Read some document and rebuild CPython with those options like this; 'env PYTHON_CFLAGS=-fPIC pyenv install -v 2.7.8'

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zeroxenator picture zeroxenator  ·  3Comments

tommyjcarpenter picture tommyjcarpenter  ·  3Comments

itanoss picture itanoss  ·  3Comments

ipfans picture ipfans  ·  3Comments

afeld picture afeld  ·  3Comments