Solutions that I found on the internet or figured out myself and do not want to forget...

Wednesday, December 15, 2010

Compile and install PyQt4 for python2.7 in Ubuntu.

UPDATE:
The original post is from 2010 and since then the world has moved on. At the time of writing this update python27 is a default python version for Ubuntu. This means that to get PyQt and python27 running you no longer have to build PyQt from source. You can just install PyQt using apt-get:

sudo apt-get install python-sip python-qt4

I am keeping the original post in case you do need to build it from source (for example if you are using virtualenv, python3 or you are actually not using Ubuntu but a distribution that does not have a prepackaged PyQt).

ORIGINAL POST:

This tutorial shows how to build and install PyQt4 with python2.7 in Ubuntu.

If you want to use it with different version of python than 2.7 than replace every 2.7 in instructions below with the version you are using and it should work (tested with 2.6 and 3).