How do Install PyQt4 for Python3k on Ubuntu?

64 views
Skip to first unread message

Edward K. Ream

unread,
Dec 3, 2009, 1:03:56 PM12/3/09
to leo-editor
PyQt4 is installed on my Ubuntu machine for Python 2.6. This happened
before I installed Python 3.1. How do I tell the package manager to
install for PyQt4 for Python 3.1?

At present, when I import PyQt from Leo running Python 2.6 I get PyQt
from
/usr/lib/pymodules/python2.6

So presumably I want to create /usr/lib/pymodules/python3.1

Reinstalling the PyQt package from the synaptic package manager has no
effect.

Edward

zpcspm

unread,
Dec 3, 2009, 1:38:49 PM12/3/09
to leo-editor

Edward K. Ream

unread,
Dec 3, 2009, 3:31:26 PM12/3/09
to leo-e...@googlegroups.com
On Thu, Dec 3, 2009 at 12:38 PM, zpcspm <zpc...@gmail.com> wrote:



Perhaps it is not in the repos yet:

https://bugs.launchpad.net/ubuntu/+source/python-qt4/+bug/400826



Yes, one way would be to build from sources.

Edward

Edward K. Ream

unread,
Dec 3, 2009, 4:10:19 PM12/3/09
to leo-editor
On Dec 3, 2:31 pm, "Edward K. Ream" <edream...@gmail.com> wrote:

> >https://bugs.launchpad.net/ubuntu/+source/python-qt4/+bug/400826
>
> Yes, one way would be to build from sources.

This is straightforward. Here is what I did:

Download sip and pyqt from pyqt the links on the website:
http://www.riverbankcomputing.co.uk/news

Extract the .tar.gz files to, say,your home folder, yielding the
following folders:

PyQt-x11-gpl-4.6.2
sip-4.9.3

Follow the install directions. That is, in each folder, run:

python3.1 configure.py
make
sudo make install

That's all

I can now import PyQt4 from Python3.1.

Edward
Reply all
Reply to author
Forward
0 new messages