0

前几天我使用以下命令在 Kubuntu 12.10 下安装了 pyside:

sudo add-apt-repository ppa:pyside
sudo apt-get update
sudo apt-get install python-pyside

那时一切都很好。我试图将已安装的文件移动到服务器上的集中位置,该位置是所有机器上我的 PYTHONPATH 的一部分,但之后一些主机应用程序出现问题,所以我再次删除了这些文件并在我的本地机器上运行它:

sudo apt-get purge python-pyside

其次是:

sudo apt-get autoremove

现在我正在尝试重新安装 PySide 重新开始(顶部)。这是安装程序的输出:

sudo apt-get install python-pyside
[sudo] password for frank: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  python-pyside.phonon python-pyside.qtdeclarative python-pyside.qtgui python-pyside.qthelp python-pyside.qtnetwork python-pyside.qtopengl
  python-pyside.qtscript python-pyside.qtsql python-pyside.qtsvg python-pyside.qttest python-pyside.qtuitools python-pyside.qtwebkit
  python-pyside.qtxml
The following NEW packages will be installed:
  python-pyside python-pyside.phonon python-pyside.qtdeclarative python-pyside.qtgui python-pyside.qthelp python-pyside.qtnetwork
  python-pyside.qtopengl python-pyside.qtscript python-pyside.qtsql python-pyside.qtsvg python-pyside.qttest python-pyside.qtuitools
  python-pyside.qtwebkit python-pyside.qtxml
0 upgraded, 14 newly installed, 0 to remove and 433 not upgraded.
Need to get 0 B/5,137 kB of archives.
After this operation, 18.6 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Selecting previously unselected package python-pyside.qtgui.
(Reading database ... 126047 files and directories currently installed.)
Unpacking python-pyside.qtgui (from .../python-pyside.qtgui_1.1.1-3_amd64.deb) ...
Selecting previously unselected package python-pyside.phonon.
Unpacking python-pyside.phonon (from .../python-pyside.phonon_1.1.1-3_amd64.deb) ...
Selecting previously unselected package python-pyside.qtnetwork.
Unpacking python-pyside.qtnetwork (from .../python-pyside.qtnetwork_1.1.1-3_amd64.deb) ...
Selecting previously unselected package python-pyside.qtdeclarative.
Unpacking python-pyside.qtdeclarative (from .../python-pyside.qtdeclarative_1.1.1-3_amd64.deb) ...
Selecting previously unselected package python-pyside.qthelp.
Unpacking python-pyside.qthelp (from .../python-pyside.qthelp_1.1.1-3_amd64.deb) ...
Selecting previously unselected package python-pyside.qtopengl.
Unpacking python-pyside.qtopengl (from .../python-pyside.qtopengl_1.1.1-3_amd64.deb) ...
Selecting previously unselected package python-pyside.qtscript.
Unpacking python-pyside.qtscript (from .../python-pyside.qtscript_1.1.1-3_amd64.deb) ...
Selecting previously unselected package python-pyside.qtsql.
Unpacking python-pyside.qtsql (from .../python-pyside.qtsql_1.1.1-3_amd64.deb) ...
Selecting previously unselected package python-pyside.qtsvg.
Unpacking python-pyside.qtsvg (from .../python-pyside.qtsvg_1.1.1-3_amd64.deb) ...
Selecting previously unselected package python-pyside.qttest.
Unpacking python-pyside.qttest (from .../python-pyside.qttest_1.1.1-3_amd64.deb) ...
Selecting previously unselected package python-pyside.qtxml.
Unpacking python-pyside.qtxml (from .../python-pyside.qtxml_1.1.1-3_amd64.deb) ...
Selecting previously unselected package python-pyside.qtuitools.
Unpacking python-pyside.qtuitools (from .../python-pyside.qtuitools_1.1.1-3_amd64.deb) ...
Selecting previously unselected package python-pyside.qtwebkit.
Unpacking python-pyside.qtwebkit (from .../python-pyside.qtwebkit_1.1.1-3_amd64.deb) ...
Selecting previously unselected package python-pyside.
Unpacking python-pyside (from .../python-pyside_1.1.1-3_all.deb) ...
Setting up python-pyside.qtgui (1.1.1-3) ...
Setting up python-pyside.phonon (1.1.1-3) ...
Setting up python-pyside.qtnetwork (1.1.1-3) ...
Setting up python-pyside.qtdeclarative (1.1.1-3) ...
Setting up python-pyside.qthelp (1.1.1-3) ...
Setting up python-pyside.qtopengl (1.1.1-3) ...
Setting up python-pyside.qtscript (1.1.1-3) ...
Setting up python-pyside.qtsql (1.1.1-3) ...
Setting up python-pyside.qtsvg (1.1.1-3) ...
Setting up python-pyside.qttest (1.1.1-3) ...
Setting up python-pyside.qtxml (1.1.1-3) ...
Setting up python-pyside.qtuitools (1.1.1-3) ...
Setting up python-pyside.qtwebkit (1.1.1-3) ...
Setting up python-pyside (1.1.1-3) ...

但是,唯一安装的是 /usr/lib/python2.7/dist-packages 中的一些已编译插件 (*.so)。包文件夹等内没有init .py (就像第一次一样)。自然我无法导入 PySide。

我很茫然,任何帮助将不胜感激!

谢谢,坦率

4

1 回答 1

0

我试图将安装的文件移动到服务器上的集中位置

你不能那样做!好吧,你可以,但是在通过包管理器安装程序和实用程序的 Linux 发行版上,你所做的就是完全错误的。

您的系统通过包管理器跟踪已安装的文件。当您手动将这些文件移动到其他位置时 - 您严重破坏了一些东西。

我怀疑您已经移动了那些 pyside 软件包未单独安装的其他文件。如果您移动了通过其他软件包安装的文件,那么您也破坏了这些软件包。

尝试完全清除所有与 python 相关的包 - 不仅仅是与 pyside 相关的包 - 并重新安装它们。并且请为了所有美好的事物的爱 - 将它们留在包装维护者放置它们的地方!:)

如果您想要自定义安装 Python 和 Pyside 等,那么您唯一的其他选择是下载源代码并从中配置/编译/安装。

于 2013-08-30T12:34:57.363 回答