Python 在Redhat Linux上安装PySide 1.2.2

Python 在Redhat Linux上安装PySide 1.2.2,python,qt,python-2.7,pyside,Python,Qt,Python 2.7,Pyside,正在尝试安装PySide 1.2.2,如下所示 [ananthul@ homes/PySide-1.2.2]$python Python 2.7.6 (default, Apr 25 2014, 14:10:55) [GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2 Type "help", "copyright", "credits" or "license" for more information. import platform >

正在尝试安装PySide 1.2.2,如下所示

[ananthul@ homes/PySide-1.2.2]$python
Python 2.7.6 (default, Apr 25 2014, 14:10:55) 
[GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import platform
>>> platform.architecture()[0]
'64bit'
安装命令如下所示

python setup.py install
[ananthul@xxxxx homes/PySide-1.2.2]$qmake --version
QMake version 2.01a
当我尝试上面的命令时,我得到下面的安装错误

Linking CXX shared library libshiboken-python2.7.so
/usr/bin/ld: Python-2.7.6/lib/libpython2.7.a(abstract.o):relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
Python-2.7.6/lib/libpython2.7.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [libshiboken/libshiboken-python2.7.so.1.2.2] Error 1
make[1]: *** [libshiboken/CMakeFiles/libshiboken.dir/all] Error 2
make: *** [all] Error 2
尝试在执行./configure时使用--enable shared选项编译python。这就解决了问题。