Installing PyQt5 on Ubuntu and Python 3.4

After grueling hours trying to get iPython PyLab running with my Python3.4 installation, I finally managed to get one of its dependencies (PyQt5) working correctly. I’ll leave my solution here for posterity…

OS: Ubuntu 15.04

Python version: 3.4

Step 1

Install (using Ubuntu’s Software Center – USC):

  • libqt5svg5
  • libqt5svg5-dev

Step 2

Download and install SIP source.

For both SIP and PyQt5 installations, I needed to direct it to my ‘usr/local/lib/python3.4/dist-packages’ folder. Apparently default goes to ‘usr/lib/’.

After unpacking the .tar file, run these commands inside the extracted folder:

http://pastebin.com/embed_iframe.php?i=y7KAb42w

Step 3

Download and install PyQt5 source.

After unpacking the .tar file, run these commands inside the extracted folder (they are the same as before):

http://pastebin.com/embed_iframe.php?i=y7KAb42w

Testing

In my case, I was having issues with the QtSvg module which was not being installed with PyQt5.

To test everything I ran python 3.4 and:

from PyQt5 import QtSvg

If this runs, you are golden.


Helpful sources I used:

[1], [2], [3]

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: