This article is part 1 of 8 in the series Python PySide/PyQt Tutorial

Last Updated: Thursday 12th December 2013

In the last article, I introduced you to Qt and its Python interfaces, PyQt and PySide; now that you know a bit about them, pick one and install it. I recommend PySide for two reasons: first, this tutorial is conceived in terms of PySide, and may cover a few topics that are less fully-implemented in PyQt; and second, its licensing is more flexible for your future use. Either one will work, however.

The following will show you how to install PySide and PyQt on Windows, Mac and Linux. Binary installers are available for most common platforms; links and setup instructions are outlined below:


Installation of PySide or PyQt is by a simple point-and-click installer on Windows. For PySide, get the appropriate binary for your version of Python from Run the installer, confirming the location of your Python installation (which should be correctly auto-detected) and optionally selecting an installation directory, and you should have a working PySide installation in seconds.

PyQt is much the same, except that you can choose only a partial installation instead of a full one: don't. You'll want the examples and demos. They're worth the space. Get the PyQt installers from Riverbank.

Mac OS X

Mac OS X binaries to install PySide are available from the Qt Project.

For PyQt, use the binaries provided by the PyQtX project. Choose the complete version for your Python version, which supplies Qt as well as PyQt, unless you're certain that you have Qt installed in the correct version; then use the minimal installers.

If you're using Homebrew, you can do:


from the command line. You can also use MacPorts:

changing NN to match your Python version. Similarly, you can do:

to install PyQt.

Linux (Ubuntu and Debian-based)

For Debian- and Ubuntu-based Linux distributions, installation of PySide or PyQt is simple; just do:

from the command line. For PyQt:

Alternatively, use Synaptic to install your choice of python-pyside or python-qt4.

Linux (CentOS and RPM-based)

Installation of PySide or PyQt is also simple for most RPM-based distros using yum; just do:

as root from the command line to install PySide. For PyQt, do

Now that you have an installation of PySide or PyQt, we are almost ready to begin learning to use it — but first, we must discuss editors and IDEs. We'll do so in our next installment.

To Practice: Try this interactive course on the basics of Lists, Functions, Packages and NumPy in Python.

  • Mariano

    I have CentOS 5 i686 and
    yum install python-pyside pyside-tools
    yum install PyQt4
    always says me that there are not packages found…
    can you please tell me what repo should I add?

    Thnak you!

  • Eko Suprapto Wibowo

    I believe that this is the first article, so… I think that previous article somewhat confusing..
    Great article though!

  • Latik

    hi.. I have centos 5.10 and I tried to install PyQt4 using command ‘yum install PyQt4’ but it is showing error as ‘no package available’

    • Hi Latik, I’m not sure about CentOS 5.x, 6.x has the package in the base repo. Make sure you have the base repo installed, and if it’s not in there, I’d download the source RPM and build it. Otherwise, you can download the binary RPMs here:

  • Joris

    I really want to get started using a Qt feature using Python so i wanted to install PySide or PyQt5. on Mac OSX El Capitan.
    I used “brew install pyqt” and after linking with sip as brew asks, i used “brew install pyqt5” and brew reported no errors. Still, I can’t import PyQt5 in python (neither 2.7 or 3.5.1). Do you know about this issue ? I’m struggling with installing PyQt5 for days now.

    I also installed PySide using “brew install pyside” and brew reported no errors as well but as for PyQt5, I can’t import it in python.

    Thanks for the help.

  • Pingback: WiFi-Pumpkin - Rogue WiFi Access Point Attack - DigitalMunition()

  • Pingback: 3vilTwinAttacker – Create Rogue Wi-Fi Access Point and Snooping on the Traffic | FREELANCER()