zsshao
zsshao

Reputation: 169

pip install pyqt5, it cannot go on

 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.

Upvotes: 16

Views: 10719

Answers (6)

Maximilian Schempp
Maximilian Schempp

Reputation: 1

I am using uv and yes "yes" | uv sync -vvvv worked for me. I guess that should also for pip if it prompts you to input "yes" manually

Upvotes: 0

anilkir
anilkir

Reputation: 46

On Ubuntu 20.04, --config-settings or --confirm-license params are not available with pip 24.2.

The solution for me was to set an environment variable to pre-accept the license terms before the pip install like this:

export PYQT5_LICENSE=1
pip3 install --upgrade PyQt5

Upvotes: 0

Jortstek
Jortstek

Reputation: 363

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

In my experience, installing anything on pip seems to turn into a dependency nightmare whereas apt has been rock solid for decades. No idea why.

Upvotes: 2

Codeman
Codeman

Reputation: 1

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 .

Upvotes: 0

boba
boba

Reputation: 41

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.

Upvotes: 4

ninjaphysics
ninjaphysics

Reputation: 391

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.

Upvotes: 39

Related Questions