2

我刚刚升级到 Ubuntu 13.04(测试版),尝试使用 pip 将 pyside 安装到 Virtualenv(python 2.7.4)时出现错误:

error: Failed to locate the Python library /usr/lib/libpython2.7.so.1

有人有想法么?我已经尝试过以前的版本以及开发版本,但仍然没有运气。

编辑:post_install 的控制台日志

(monster)tony@tonyubuntu:~/Downloads/pyside-setup$ python pyside_postinstall.py -install
PySide package found in /home/tony/Downloads/pyside-setup/PySide...
Patched rpath in /home/tony/Downloads/pyside-setup/PySide/QtUiTools.so to /home/tony/Downloads/pyside-setup/PySide.
Patched rpath in /home/tony/Downloads/pyside-setup/PySide/QtCore.so to /home/tony/Downloads/pyside-setup/PySide.
Patched rpath in /home/tony/Downloads/pyside-setup/PySide/QtTest.so to /home/tony/Downloads/pyside-setup/PySide.
Patched rpath in /home/tony/Downloads/pyside-setup/PySide/QtHelp.so to /home/tony/Downloads/pyside-setup/PySide.
Patched rpath in /home/tony/Downloads/pyside-setup/PySide/QtXml.so to /home/tony/Downloads/pyside-setup/PySide.
Patched rpath in /home/tony/Downloads/pyside-setup/PySide/QtSql.so to /home/tony/Downloads/pyside-setup/PySide.
Patched rpath in /home/tony/Downloads/pyside-setup/PySide/QtGui.so to /home/tony/Downloads/pyside-setup/PySide.
Patched rpath in /home/tony/Downloads/pyside-setup/PySide/shiboken to /home/tony/Downloads/pyside-setup/PySide.
Patched rpath in /home/tony/Downloads/pyside-setup/PySide/QtDeclarative.so to /home/tony/Downloads/pyside-setup/PySide.
Patched rpath in /home/tony/Downloads/pyside-setup/PySide/QtSvg.so to /home/tony/Downloads/pyside-setup/PySide.
Patched rpath in /home/tony/Downloads/pyside-setup/PySide/QtNetwork.so to /home/tony/Downloads/pyside-setup/PySide.
Patched rpath in /home/tony/Downloads/pyside-setup/PySide/QtScriptTools.so to /home/tony/Downloads/pyside-setup/PySide.
Patched rpath in /home/tony/Downloads/pyside-setup/PySide/QtScript.so to /home/tony/Downloads/pyside-setup/PySide.
Patched rpath in /home/tony/Downloads/pyside-setup/PySide/QtWebKit.so to /home/tony/Downloads/pyside-setup/PySide.
Patched rpath in /home/tony/Downloads/pyside-setup/PySide/phonon.so to /home/tony/Downloads/pyside-setup/PySide.
Patched rpath in /home/tony/Downloads/pyside-setup/PySide/QtXmlPatterns.so to /home/tony/Downloads/pyside-setup/PySide.
Patched rpath in /home/tony/Downloads/pyside-setup/PySide/QtOpenGL.so to /home/tony/Downloads/pyside-setup/PySide.
PySide package successfully installed in /home/tony/Downloads/pyside-setup/PySide...
4

2 回答 2

6

我是 pyside 设置脚本的作者。我将在 ubuntu 13.04 上测试构建脚本。您使用的是 32 位还是 64 位版本?

更新 1:修复了 Ubuntu 13.04 的 pyside 构建脚本。您需要从 git repo 克隆最新的 pyside-setup 并按如下方式构建(注意 --qmake 参数):

$ git clone https://github.com/PySide/pyside-setup.git pyside-setup
$ cd pyside-setup
$ python setup.py bdist_egg --qmake=/usr/bin/qmake-qt4

然后按如下方式安装 PySide 发行版:

$ sudo easy_install dist/PySide-1.1.3dev-py2.7.egg
$ sudo python pyside_postinstall.py -install

我没有使用 pip,因为我更喜欢构建一次 egg 并根据需要安装多次问候 R。

于 2013-04-18T06:52:31.887 回答
1

另一种方式:

sudo ln -s /usr/lib/x86_64-linux-gnu/libpython2.7.so.1 /usr/lib/ && pip install PySide
于 2013-05-08T16:19:19.970 回答