problem with pyqt.. help please...

Threader Slash threaderslash at gmail.com
Sun Nov 22 23:52:45 CET 2009


---------- Forwarded message ----------
From: Jebagnana Das <jebagnanadas at gmail.com>
To: python-list at python.org
Date: Sat, 21 Nov 2009 19:17:56 +0530
Subject: problem with pyqt.. help please...
Hi friends,
             I've recently changed to ubuntu 9.04.. I've not had any problem
with the installation of pyqt as it is available from the ubuntu
repositories with umpteen number of packages.. Anyhow i've to download
tarball file for python 3.1 and installed it.. I found that PyQt4 supports
python 3.1(Am i right?)..

I wanted to check the pyqt installation with a sample program..

import sys
from PyQt4 import QtGui
app=QtGui.QApplication(sys.argv)
widget=QtGui.QWidget()
widget.resize(250,150)
widget.setWindowTitle('Simple')
widget.show()
sys.exit(app.exec_())

when i issued the command
$python simple.py
it worked perfectly since it's executed with 2.6 installation..
But when i tried to execute it with
$python3 simple.py
it showed the error like
ImportError: No module named PyQt4
So i searched the sys.path for 2.6 and included
/usr/lib/python2.6/dist-packages
in python3 sys.path...
Now when i tried to run this with python3  the error is like..
ImportError: /usr/lib/python2.6/dist-packages/PyQt4/QtGui.so: undefined
symbol: PyString_FromString
I got the same error when i tried to execute another program... So can u
please tell me how to solve this problem?? Am i heading in the right
direction???...

Thanks & Regards...

Jebagnanadas,
Python Learner..

...........................................
it just looks like your problem is on setting your installation paths. Have
a look here:
http://www.linux.org/docs/ldp/howto/Nvidia-OpenGL-Configuration/instqt.html
http://www.linuxforums.org/forum/debian-linux-help/108948-setting-path-qt.html

Check and follow the steps. It should fix your problem.
- ThreaderSlash.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20091123/aaa1400b/attachment.html>


More information about the Python-list mailing list