Reputation:
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
Upvotes: 29
Views: 48265
Reputation: 2316
I solved this by updating pip
python -m pip install --upgrade pip
Upvotes: 5
Reputation: 23
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.
Upvotes: 1
Reputation: 91
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.
Upvotes: 9
Reputation: 845
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
Upvotes: 31
Reputation: 378
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:
-vv
pip-install-
project.py
in an editorif not self.confirm_license:
and change it to if False:
fg
to resume the install, and it should work(update) my build ultimately failed for what I assume to be unrelated reasons
Upvotes: 19
Reputation: 21662
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
Upvotes: 7
Reputation: 131
first upgrade your pip: python -m pip install --upgrade pip than install PyQt5: pip install PyQt5
Upvotes: 12
Reputation: 139
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...
Upvotes: 11