I'm trying to install PyQT5 on my Raspberry Pi and used the command sudo pip3 install pyqt5
.
But it has been stuck on that for over an hour nowand I'm starting to get frustrated, since it still moves, so it didn't crash or anything. Is there a workaround for that or am I missing something?
Thanks in advance
-
use `sudo apt-get install python3-pyqt5` – eyllanesc Mar 09 '21 at 15:16
-
```sudo apt-get install python3-pyqt5``` is not working with me.. It still stucks... – slawalata Apr 15 '21 at 05:09
-
2I seem to have the same problem. Did you fix your problem? – monok Apr 29 '21 at 08:32
-
@monok were you able to find a fix for this? – Marcellus May 05 '21 at 23:34
-
@Marcellus No, problem still exists – monok May 08 '21 at 10:43
-
1Does it finally finish? I'm fine with waiting overnight if it actually finishes. – chris May 17 '21 at 23:13
-
1Ended up working for me after 2 hours... maybe you just have to wait – Marcellus May 18 '21 at 19:41
-
Did someone actually compare the download speed between sudo apt-get and pip install? I have been waiting for over 30 minutes now and it isn't done on my part. – Batselot Aug 10 '21 at 14:53
-
1Rapsbery Pi 4: took about 1h40min to complete. Longest wait was with 'preparing metadata (pyproject.toml)' line to complete. – smajli Mar 11 '22 at 14:26
9 Answers
If stuck asking for license (confirm via pip install pyqt5 --verbose
), piggyback from @purpleladydragons, the following command worked for me on Ventura and python 3.10.7 after installing qt via brew
:
https://stackoverflow.com/a/74071222/733687
pip install pyqt5 --config-settings --confirm-license= --verbose

- 655
- 2
- 8
- 12
This is a little hacky, but it worked:
First I tried --verbose
as per mrgloom's answer, and found it was indeed stuck on asking for the license. Updating pip did not help me. The problem here seems to be that it can print, but it isn't receiving keyboard input.
So then I did the following:
- Run pip install with
-vv
- Hit ctl-z after a second or two, before it gets to where it asks for the license
- Look for the path of the temp directory with a folder name beginning with
pip-install-
- Go there and open up
project.py
in an editor - Find the line
if not self.confirm_license:
and change it toif False:
- Now use
fg
to resume the install, and it should work
(update) my build ultimately failed for what I assume to be unrelated reasons

- 308
- 2
- 7
-
2For anybody who wants to dig deeper into this issue, I think the root cause of this is probably a failure of an earlier code line reading `if tool == 'pep517': self.confirm_license = True`, which has a comment reading `Automatically confirm the license if there might not be a command line option to do so.`. This was presumably meant to allow it to autoconfirm the license if installing with pip (as we are), and probably stopped working for some reason.. (I don't know why, but that would be the thing to dig into)... – Yaakov Saxon Sep 22 '22 at 17:42
-
3Another possible avenue would be to see if there's any way to pass through pip to this script the command line flag `--confirm_license`, which from a cursory reading of the code looks like it should also work. Unlike the previous suggestion this would not really be a fix to the root of the problem, but could be an easier stackoverflow answer (just add this command line flag to pip) than what I gave. – Yaakov Saxon Sep 22 '22 at 17:43
-
Piggybacking off @yaakov-saxon, this [answer](https://stackoverflow.com/a/74071222/733687) on a similar question provides the specific install command – purpleladydragons Nov 08 '22 at 18:16
-
2Make user pip3 is at version 22.3 or higher then you can type: pip3 install pyqt5 --config-settings --confirm-license= --verbose and avoid modifying any .py files – Yohst Nov 17 '22 at 20:53
-
1I just struggled with this problem recently and Yohst's suggestion worked: `pip3 install pyqt5 --config-settings --confirm-license= --verbose`. On macOS there is no pip-install folder in /tmp – Cosmin Ioniță Jan 06 '23 at 20:38
-
1Thanks @CosminIoniță that solved my problem. Your answer should be upvoted more ! :D – dallonsi Aug 28 '23 at 09:20
I had the same problem and got impatient after a few dozen minutes...
Then tried running the command with:
pip3 install --verbose PyQt5
so this way I could always be sure that it didn't crash in the background.
It completed after almost 2 hours. The compilation takes some time...

- 131
- 1
- 5
first upgrade your pip: python -m pip install --upgrade pip than install PyQt5: pip install PyQt5

- 61
- 1
- 2
-
This worked for me - froze when using pip 19.0.3, but worked using pip 22.2.2 – Damian Aug 05 '22 at 19:05
For me for pip3 install --verbose pyqt6==6.3.0
command, it stuck on:
Querying qmake about your Qt installation...
This is the GPL version of PyQt 6.3.0 (licensed under the GNU General Public License) for Python 3.7.9 on darwin.
Type 'L' to view the license.
Type 'yes' to accept the terms of the license.
Type 'no' to decline the terms of the license.
I didn't check it second time, but seems updating pip helps, or using method python -m pip install
to install, like:
python -m pip install --upgrade pip
python -m pip install onnxruntime==1.11.1 numpy==1.21.6 h5py numexpr protobuf==3.20.1 opencv-python==4.5.5.64 opencv-contrib-python==4.5.5.64 pyqt6==6.3.0 onnx==1.11.0 torch==1.10.0 torchvision==0.11.1

- 20,061
- 36
- 171
- 301
pip install pyqt5 --config-settings --confirm-license= --verbose
This is what worked for me as Ryan said above. I am on Ventura and tried Python 3.11 and 3.9
My original issue is that Pyinstaller would not create a working .app file through my anaconda environment. I suspect this is because anaconda's PyQt is simply pyqt and not standard pyqt5. I already had pyqt5 installed through Brew, but didn't use it for my projects.
Now have a virtualenv environment and will check if it works but I can finally install pyqt5 with pip.

- 656
- 1
- 6
- 21

- 41
- 1
I solved this by updating pip
python -m pip install --upgrade pip

- 25,369
- 29
- 96
- 135

- 1,878
- 4
- 24
- 30
Start out by doing a quick update of pip [as mentioned in other replies]:
pip install --verbose PyQt5
Use the verbose flag to get more info on the install. Pip can be very shouty about upgrading, but mine had been silent and lept from 20.0.2 to 23.0 and suddenly the install was instant.

- 13
- 3