gpt4 book ai didi

python - 导入错误 : No module named PySide

转载 作者:太空宇宙 更新时间:2023-11-03 11:02:55 25 4
gpt4 key购买 nike

我已经在我的 Ubuntu 12.04 中安装了 PySide。当我尝试在 python 控制台中使用 import PySide 时,出现以下错误。

import PySide
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named PySide

我的 Python 路径是:

print sys.path ['', '/usr/lib/python2.7',
'/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages/PIL',
'/usr/lib/python2.7/dist-packages/gst-0.10',
'/usr/lib/python2.7/dist-packages/gtk-2.0',
'/usr/lib/pymodules/python2.7',
'/usr/lib/python2.7/dist-packages/ubuntu-sso-client',
'/usr/lib/python2.7/dist-packages/ubuntuone-client',
'/usr/lib/python2.7/dist-packages/ubuntuone-control-panel',
'/usr/lib/python2.7/dist-packages/ubuntuone-couch',
'/usr/lib/python2.7/dist-packages/ubuntuone-installer',
'/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol']

如何解决这个问题?

最佳答案

要使用 python 3,只需按照此处的说明操作:

https://wiki.qt.io/PySide_Binaries_Linux

在 ubuntu 12.04 中意味着只需在控制台中输入一行:

sudo apt-get install python3-pyside

关于python - 导入错误 : No module named PySide,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27798829/

25 4 0