Skip to content

Compiling PyQt5 on Ubuntu 12.04

mottosso edited this page Jan 1, 2015 · 21 revisions

This guide provides basic instructions on getting PyQt5 compiled on Ubuntu 12.04 x64 for Python 2.7

Prerequisites

To complete this compilation, you'll need to three things.

  1. Download and install Qt 5.3.1
  2. Download and unpack sip
  3. Download and unpack PyQt 5.3.2

5.4 was recently released, and it's quite likely that the process is identical to compiling 5.3.1, but I have yet to give it a try.

Installation

  1. Make sure you use Qt 5.3.1, and not 5.3.2 as it is not yet supported.
  2. Install Dependencies
$ sudo apt-add-repository ppa:ubuntu-sdk-team/ppa
$ sudo apt-get update
$ sudo apt-get install qtdeclarative5-dev
  1. Compile SIP
$ cd sip-*
$ python configure.py
# --qmake: Tell compiler about location of Qt binaries
# --sip-incdir: Tell compiler about location of SIP
$ cd ../PyQt5*
$ python configure.py --qmake ~/Qt/5.3/gcc_64/bin/qmake --sip-incdir ../sip-*/siplib

References

Welcome to the wiki for PyQt5 using Python 2.7. For Python 3.4, head here

Table of contents

Developer Resources

Compilation Instructions

Clone this wiki locally