I have a Raspberry Pi 3 with Raspbian installed, along with a 7" touch screen. I'm in the process of creating an application in Python to read several DS18B20 Thermocouples to monitor the temperature of several aquariums (relays attached to heaters will be added later). I have a form that I created in QT and converted to PyQt5 (through te command line tool) and everything looks the way I want it, except that I can't find the library for PyQT5 for the Raspberry Pi. How/where can I find this?

  • 1
    here is a related thread. looks old but might still be worth checking out Mar 7, 2017 at 1:38
  • I can't leave a comment, because I don't have enough reputation I tried what is written above, but the sip file no longer exists, so I can't install sip. Has anyone found the sip file needed for install somewhere else?
    – Jakub
    May 12, 2022 at 7:23

5 Answers 5


OK... I managed to get this to work. This is what I did.

  1. QT Core needs to be installed with

    sudo apt-get install qt5-default

  2. You'll need to copy over sip and PyQt5 to your Raspberry Pi (I used SFTP). Just put the tar files someplace that you can get to them easily.

  3. You'll need to extract each of them, using the tar command, with the -xzvf tag so you'll end up with tar -xzvf sip-4.19.1.tar.gz`for sip.

  4. In each folder, you'll need to set up for the build. This is done by typing "python config.py" in each directory.

  5. The contents of each directory needs to be built and installed, go to your sip folder and type "make" this will take a very long time. After it's through, type "sudo make install".

  6. Now do the same thing in your PyQt5 directory.

  • 1
    Note: It's not quite that simple any longer. The sip configuration now needs to be explicitly told to create PyQt5.sip. See python.6.x6.nabble.com/private-sip-td5235854.html Aug 6, 2018 at 15:49
  • 1
    So, you have to use the tag "--sip-module=PyQt5.sip" on the config line... Aug 7, 2018 at 16:53
  • 1
    I should point out that I had to use --sip tag point to the sip-4.19.1\sipgen\sip folder to be able to run the PyQt5 configure.py, so I had: python3 configure.py --sip \home\Downloads\sip-4.19.1\sipgen\sip Jun 17, 2019 at 11:54
  • 2
    Another user has pointed out that the link to sip in #2 is dead and recommended this one: riverbankcomputing.com/static/Downloads/sip/4.19/… Which is a direct tar.gz download. I take no responsibility for it ;)
    – goldilocks
    Dec 14, 2019 at 18:13

In Raspbian Stretch Lite the following worked for me:

sudo apt-get update
sudo apt-get install qt5-default pyqt5-dev pyqt5-dev-tools
  • 1
    Oh, good! they've finally added pyqt5 to the repos. Sep 5, 2017 at 14:49
  • 1
    What should I do after these commands? I still get ImportError: No module named 'PyQt5' Apr 6, 2019 at 13:49
  • 2
    Is this for python2 or python3?
    – karelv
    Nov 7, 2019 at 23:21

I developed a similar application using PyQt4 and Qt4-designer. You have to install pyqt4 all modules:

sudo apt-get install qt4-default qt4-designer qt4-doc qt4-dev-tools python-qt4

So in your case just change all 4-5 i.e qt4 -- qt5.

  • 1
    They didn't have the compiled stuff for version 5 in the repository when I wrote this. May 22, 2017 at 14:40

I can't leave a comment, not enough reputation, but thought I should mention this in case it helps anyone using VirtualEnv:

In my case (Raspbian on a Raspberry Pi 3, Python 3 in a virtual environment) the answer provided by CharlieHorse is the only one which worked as I could not get

sudo apt-get install

to install into virtual environments. I tried something like this question on Stack Overflow but because PyQt5 relies on SIP which interfaces with some C code, it needs to be compiled from scratch and can't just be copied, as recommended in the accepted answer of that question.


You can try steps mentioned below. It will take some time to make and make install. Please be patient.

sudo apt-get install qt5-default

wget https://www.riverbankcomputing.com/static/Downloads/sip/4.19.24/sip-4.19.24.tar.gz

tar -xzvf sip-4.19.24.tar.gz

cd sip-4.19.24

python configure.py


make install

cd ../

wget https://www.riverbankcomputing.com/static/Downloads/PyQt5/PyQt5-5.15.1.dev2008081558.tar.gz

tar -xzvf PyQt5-5.15.1.dev2008081558.tar.gz

cd PyQt5-5.15.1.dev2008081558

python configure.py


make install

pip install PyQt5-sip

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.