PDA

View Full Version : Python 2.6 QT4



SelbyRowleyCannon
July 29th, 2012, 12:24 AM
I have some stone-age software the only runs on Python 2.6. When I try to run it, I get:

Traceback (most recent call last):
File "pesterchum.py", line 13, in <module>
from PyQt4 import QtGui, QtCore
ImportError: No module named PyQt4

I know that 2.6 is ancient, but I can't bring it up to date because the program architecture is way beyond me. I have attached the source code, none of you will probably have time to bring it up to date, but can you please tell me either:

What the correct module is and how to fix it, or

Fix all references and send the file back to me. (I understand if you don't have time for this)

Thanks a lot,
-S :guitar:

lykwydchykyn
July 29th, 2012, 04:21 AM
First, what version of Ubuntu are you running this on?

Second, why does it have to run on 2.6?

juancarlospaco
July 29th, 2012, 04:48 AM
I think python-qt4 is not installed.

good luck...

SelbyRowleyCannon
July 30th, 2012, 12:39 AM
First, what version of Ubuntu are you running this on?

Second, why does it have to run on 2.6?

Ubuntu 12.04, and because the software is ancient, and it's way beyond my ability to bring it up to date. Also, python-qt4 is installed.

oldfred
July 30th, 2012, 01:34 AM
I changed and now I forgot why. You can see I commented out the version similar to yours.

#from PyQt4 import QtCore, QtGui, QtSql, Qt
import sys
from decimal import *
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4.QtSql import *

spjackson
July 30th, 2012, 09:13 AM
I know that 2.6 is ancient, but I can't bring it up to date because the program architecture is way beyond me. I have attached the source code, none of you will probably have time to bring it up to date, but can you please tell me either:

I cannot see any attached source code. Which version of python are you trying to use on 12.04? Is it 2.7.3 or python3?