Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImportError: No module named PySide

Tags:

python

pyside

I have installed PySide in my Ubuntu 12.04. When I try to use import PySide in the python console I am getting the following error.

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

My Python Path is :

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']

how to fix this problem ?

like image 343
Unnikrishnan Avatar asked Jan 06 '15 12:01

Unnikrishnan


2 Answers

To use python 3, just follow the instructions here:

https://wiki.qt.io/PySide_Binaries_Linux

which in ubuntu 12.04 means just typing one line in the console:

sudo apt-get install python3-pyside
like image 97
cauchi Avatar answered Sep 28 '22 11:09

cauchi


The latest build and install instructions for PySide are here:

http://pyside.readthedocs.org/en/latest/building/linux.html

like image 37
rlacko Avatar answered Sep 28 '22 10:09

rlacko