PyQt is not accessible from python3

Bug #400826 reported by Michael Helmling
168
This bug affects 30 people
Affects Status Importance Assigned to Milestone
python-qt4 (Debian)
Fix Released
Unknown
python-qt4 (Ubuntu)
Fix Released
Wishlist
awe

Bug Description

Binary package hint: python-qt4

With python3 and python-qt4 from current karmic packages, it's not possible to use the PyQt bindings, although PyQt supports python3 since version 4.5:
http://www.riverbankcomputing.co.uk/news/pyqt-45

But I get this:
Python 3.0.1+ (r301:69556, Apr 15 2009, 17:25:52)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyQt4
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named PyQt4

This is such a pity since python-3.x is _so_ much nicer than 2.x. ;-) Are there any problems with building pyqt for py3k?

Related branches

Revision history for this message
Michael Helmling (supermihi) wrote :

I have just compiled PyQt4 (and before SIP 4, which is needed for compiling pyqt, and which is also not available in its python3 version in the ubuntu repos) without any problems on a current 9.10 beta machine.

Changed in python-qt4 (Ubuntu):
importance: Undecided → Wishlist
Revision history for this message
Philip Muškovac (yofel) wrote :

Still doesn't work in lucid.

Changed in python-qt4 (Ubuntu):
status: New → Confirmed
awe (awekola)
Changed in python-qt4 (Ubuntu):
assignee: nobody → awe (awekola)
Changed in python-qt4 (Debian):
status: Unknown → New
Revision history for this message
Eric Lacombe (goretux) wrote :

Hi,

I would like to know if this wish will be fulfill on Maverick?

Thanks.

Revision history for this message
Scott Kitterman (kitterman) wrote : Re: [Bug 400826] Re: PyQt is not accessible from python3

Maybe. Work on this is going on in Debian. It's not clear if we will get there in time for Maverick.

Revision history for this message
Christian González (droetker) wrote :

Doesnt work in maverick.

Revision history for this message
Scott Kitterman (kitterman) wrote :

That is correct. The packaging work to support this didn't get done for Maverick.

Revision history for this message
IKT (ikt) wrote :

As someone who was quite unhappy at this issue I was surprised to find it works in natty.

Was this fixed somewhere down the line?

Revision history for this message
IKT (ikt) wrote :

Wops, to early, the module seems to import, but it doesn't seem to do anything else :s

Revision history for this message
Scott Kitterman (kitterman) wrote :

We've made progress on the packaging in Natty. Sip4 is now packaged to
support Python3 and it's one of the prerequisites for PyQt4. It's not there
yet though.

Revision history for this message
IKT (ikt) wrote :

What else needs to be done, is there somewhere I can track progress?

Revision history for this message
Christian González (droetker) wrote :

Can I help too? - I need this.

Revision history for this message
Scott Kitterman (kitterman) wrote :

Look at what was done in the sip4 packaging. PyQt4 needs similar. If you
think you make sense of it and have questions or a proposed solution feel free
to ping me on #kubuntu-devel on freenode (I'm ScottK there) or here in the
bug.

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Since Oneiric is moving to Python 3 by default, we really need it.
The upstream PyQt supports Python 3 for a very long time.

Of course, we need a separate package like python3-qt4.

Revision history for this message
Vitaly Chesnokov (chesn) wrote :

BTW, SUSE already has python3-qt4 package:
http://pkgs.org/download/python3-qt4

Maybe, it's possible to make use of their experience?

Revision history for this message
Scott Kitterman (kitterman) wrote :

I've got it mostly done, but I'll have a look.

Changed in python-qt4 (Debian):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-qt4 - 4.9-1ubuntu1

---------------
python-qt4 (4.9-1ubuntu1) precise; urgency=low

  * Merge from Debian unstable, remaining changes:
    - Update install path in debian/python-qt4.install for multiarch

python-qt4 (4.9-1) unstable; urgency=low

  * Team upload

  [ Scott Kitterman ]
  * New upstream release (Closes: #653293)
    - Adds QtDbus module support (in python-qt4 - the existing python-qt4-dbus
      is still provided for python)
    - Add relevant QtDbus.so to python-qt4.install and python3-pyqt4.install
    - Update relevant package descriptionts to mention QtDBus
    - Bump minimum python-sip-dev and python3-sip-dev version required to
      4.13.1
    - Add Breaks for python[3]-sip4 (<< 4.13.1~)
    - Refreshed patches
  * Build for python3 (Closes: #558389) (LP: #400826)
    - Add python3-all-dev/dbg and python3-sip-dev/dbg to build-depends
    - Add python3-qt4-* packages
    - Add X-Python-Version to debian/rules
    - Adjust debian/rules and add install-arch-3.%: rule
    - Add .install files for new packages
    - Adjust .install files for python packages to install python2* and not
      python* files to avoid python3 files
  * Use --no-dbg-cleaning for dh_python2 and dh_python3
  * Fix debian/rules to remove empty directories
  * Drop obsolete Conflicts/Replaces
  * Update debian/copyright

  [ Felix Geyer ]
  * Add build-arch/build-indep targets.
 -- Felix Geyer <email address hidden> Thu, 29 Dec 2011 10:44:44 +0100

Changed in python-qt4 (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.