我在我的Ubuntu 12.04中安裝了PySide。當我嘗試在python控制檯中使用導入PySide時,出現以下錯誤。ImportError:沒有名爲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']
如何解決這個問題?對於PySide
您是如何安裝Pyside的?您是如何解決自己的問題的? –
我遵循這裏指定的步驟[http://qt-project.org/wiki/PySide_Binaries_Linux] – Unnikrishnan
我想我找到了問題,我安裝了python3-pyside,但我使用的是python2.7。刪除python3-pyside後,我安裝了python-pyside,這工作正常。 – Unnikrishnan