13
 Successfully installed PyQt-builder-1.13.0 packaging-21.3 ply-3.11 pyparsing-3.0.9 setuptools-65.3.0 sip-6.6.2 toml-0.10.2
  Cleaning up...
    Removing source in /tmp/pip-install-2gmr_frd/sip
  Removed build tracker: '/tmp/pip-req-tracker-vuj8lfsc'
  Installing build dependencies ... done
  Running command /usr/bin/python3 /tmp/tmppi_h1r7x get_requires_for_build_wheel /tmp/tmpx88x82dh
  Getting requirements to build wheel ... done
    Created temporary directory: /tmp/pip-modern-metadata-b__1na9b
    Running command /usr/bin/python3 /tmp/tmpwp46ffki prepare_metadata_for_build_wheel /tmp/tmpxrg1n2t9
    Querying qmake about your Qt installation...
    This is the GPL version of PyQt 5.15.7 (licensed under the GNU General Public License) for Python 3.8.2 on linux.

    Type 'L' to view the license.
    Type 'yes' to accept the terms of the license.
    Type 'no' to decline the terms of the license.

But I can't type any words, and it stopped there. It's an aarch64 machine.

musicamante
  • 41,230
  • 6
  • 33
  • 58
zsshao
  • 139
  • 1
  • 5
  • 2
    What command did you *exactly* type and with what terminal emulator? Are you sure that you cannot just type "yes" and press enter (even if you don't see the typed text on the screen)? – musicamante Sep 14 '22 at 11:09
  • pip install pyqt5 --verbose . mate-terminal – zsshao Sep 15 '22 at 03:01
  • i can see the typed text, but it doesn't work when enter is pressed – zsshao Sep 15 '22 at 03:07
  • I have the same issue, on OSX. My typed in 'yes' and enter after that is not forwarded to the right process it seems. – timing Oct 19 '22 at 13:25
  • @musicamante I can answer your question. I'm also sure I cannot just type "yes" and press enter. I do see the typed text on the screen. I do see a newline appear after pressing enter. Nothing happens after pressing enter. – timing Oct 19 '22 at 13:58
  • What version of pip and Python are you using? You can use `pip --version` to print this out. – James Williams Oct 25 '22 at 12:12
  • You can try [this solution ](https://stackoverflow.com/a/41673145/19947054) or [similar to that ](https://stackoverflow.com/a/67664167/19947054) – VictorFilimonov-QuQunta Oct 26 '22 at 13:14

4 Answers4

25

I had the same issue, due to there being no wheel installation for my platform (Macbook w/ OSX Arm64). When pip does not have a wheel to work from, it attempts to compile from source. By passing a --config-settings argument to pip you can pass an argument to the configure.py which would be used during compilation. Luckily pyqt has an argument to automatically accept the license --confirm-license. However, pip expects the argument in a Key=value form so you need to pass --confirm-license= (i.e. no value) and it will work. It took a while (about 30+ min) but I did finally get pyqt5 installed.

here is the command I used:

pip3 install pyqt5 --config-settings --confirm-license= --verbose

hope this helps.

ninjaphysics
  • 251
  • 1
  • 4
  • 1
    If you get an error about no `config-settings` option update your pip: `pip install -U pip` – kontur Mar 08 '23 at 14:19
2

Thankyou for the help with the hang during Preparing wheel metadata … - Once I upgraded pip:

pip -U install pip

And then used that version to allow for the license confirmation

~/.local/bin/pip3 install pyqt5 —-config-settings —-confirm-license= —-verbose

the installation completed without hanging!! I had mistakenly thought the hang and killed process had to do with the machine not having enough swap space, but this is not the case. Please note that during the period of time when it is waiting for a license confirmation, before the process is killed, memory usage increases. Once I had upped to 25 gig of swap space, while still having the issues, I realized it had nothing to do with that. The process was simply waiting for the license confirmation.

Moritz Ringler
  • 9,772
  • 9
  • 21
  • 34
boba
  • 21
  • 2
1

Params --config-settings and --confirm-license are not available on Linux pip apparently.

Doing it this way somehow bypassed the problem:

pip3 install pyqt5==5.12.0

Installing anything on pip seems to turn into a dependency nightmare whereas apt has been rock solid for decades. No idea why.

Jortstek
  • 315
  • 2
  • 10
0

When I try to use pip3 install pyqt5 --config-settings --confirm-license= --verbose It give me the errot is ERROR: Could not install packages due to an OSError. It is so bad for me .

  • I install it successfully ! I try to use it again ,successfully! – Codeman May 31 '23 at 06:45
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 31 '23 at 06:48
  • If you have a new question, please ask it by clicking the [Ask Question](https://stackoverflow.com/questions/ask) button. Include a link to this question if it helps provide context. - [From Review](/review/late-answers/34474316) – PV8 May 31 '23 at 11:45