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

Viewed 7098

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

4 Answers

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...

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

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

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
Related