Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am trying to get my code running using Python3 and PyQt4. When I do this:

gruszczy@gruszczy-laptop:~/Programy/fathom/tools$ python3.1 fathomqt.py 
Traceback (most recent call last):
  File "fathomqt.py", line 5, in <module>
    from PyQt4.QtCore import (QFileSystemModel, QDir, SIGNAL, Qt)
ImportError: /usr/lib/python3/dist-packages/sip.so: undefined symbol: PyUnicodeUCS4_CompareWithASCIIString

I have installed Sip and PyQt4 by hand in both /usr/lib/python3/dist-utils and /usr/lib/python3.1/dist-packages, but neither helped.

I have libpython3.1 as well as python3.1-dev and both packages for 3.2 either. What am I missing?

I am using Natty beta, but I don't believe this is a problem, since it's now quite stable on my machine.

share|improve this question

1 Answer 1

Check out this bug.

Basically, you will need to compile pyqt yourself because using running the packaged pyqt with python 3 is not supported yet, not even in Ubuntu 11.04 (Natty).

Python 3 support for Gnome and KDE is a priority for Ubuntu 11.10 so maybe later this year, it will be working better.

However, there may be something specifically wrong since you said that you did try installing from source. Perhaps installing the packaged sip might help. Maybe, this email relates to your issue. I think you should open a Ubuntu bug about this.

share|improve this answer
    
That's strange. It seems that it is Natty's fault after all. I managed to install it PyQt from source without any problems under Maverick. –  gruszczy Apr 19 '11 at 9:31
    
No, it's not Natty's fault. Ubuntu has yet to fully integrate Python 3 so this has been an issue for several releases now. –  Jeremy Bicha Apr 19 '11 at 19:05
    
I am talking about something else. I have no problem installing Sip and PyQt4 from source (I downloaded it from riverbank) and it worked under Maverick. I did the same trick under Natty and it didn't work. –  gruszczy Apr 19 '11 at 20:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.