[PyQt] problem in making pyqt up and running...

python.noob jebagnanadas at gmail.com
Sun Nov 22 17:32:12 GMT 2009




Baz Walter wrote:
> 
> python.noob wrote:
>> 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 :working: the error is like..
>> ImportError: /usr/lib/python2.6/dist-packages/PyQt4/QtGui.so: undefined
>> symbol: PyString_FromString :confused:
>> 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???... %-|%-|
> 
> each python installation needs a pyqt4 which has been compiled for it.
> 
> please see the installation instructions here:
> 
> http://www.riverbankcomputing.com/static/Docs/PyQt4/pyqt4ref.html#installing-pyqt
> 
> HTH
> 
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
> 
> 
Thanks baz walter for your reply.. Thank you for stating my problem
clearly.. But could you please tell me in detail like in which sequence i
should install the qt to make it work with python3.. i've tried installing
SIP.. But again the same error..
Are u trying to say that i should again install SIP and PyQt by downloading
from sources(not from ubuntu repositories)... If u say yes then if i have to
install it from the sources do i need to specify any --prefix options like
in ./configure to install it to the directory where python3 is installed?
I've installed python3 in /home/jeba/Python3.1.1. I've not specified any
--prefix options in installing python 3.1.1. Can u please tell me clearly by
spending your precious time?? I'm completely new to ubuntu and pyqt.. And
one more question.. Under configuring PyQt in the website it is stated that 

to configure SIP by executing the configure.py script. For example:

python configure.py

          If i issue this command again it'll run from 2.6 installation..
Will it not create the same problem again??? Plz. explain me in detail.. I
don't want to mess up this time..
-- 
View this message in context: http://old.nabble.com/problem-in-making-pyqt-up-and-running...-tp26456683p26466396.html
Sent from the PyQt mailing list archive at Nabble.com.



More information about the PyQt mailing list