user14490575
user14490575

Reputation:

Pip Install stuck on "Preparing Wheel metadata..." when trying to install PyQT5

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

Answers (9)

gog
gog

Reputation: 1377

I simply installed PyQT 5.15.7:

pip install pyqt==5.15.7

Upvotes: 1

Fanna1119
Fanna1119

Reputation: 2316

I solved this by updating pip

python -m pip install --upgrade pip

Upvotes: 5

Edward Hiscoke
Edward Hiscoke

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

Christopher Goodwin
Christopher Goodwin

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

Ryan
Ryan

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

Yaakov Saxon
Yaakov Saxon

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:

  • 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 to if 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

Upvotes: 19

mrgloom
mrgloom

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

Viraj Raut
Viraj Raut

Reputation: 131

first upgrade your pip: python -m pip install --upgrade pip than install PyQt5: pip install PyQt5

Upvotes: 12

Gábor Kovács
Gábor Kovács

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

Related Questions