Can't install PyQt via pip because it ask about the license

Phil Thompson phil at riverbankcomputing.com
Fri Oct 7 12:27:55 BST 2022


On 07/10/2022 08:08, c.buhtz at posteo.jp wrote:
> Good Morning,
> 
> I got some steps further but didn't succeeded yet with
> installing and/or building PyQt5 on pcc64le architecture.
> 
> On 2022-10-05 11:54 <c.buhtz at posteo.jp> wrote:
>> Maybe the other way via "--global-config" is a better solution?
> 
> Again I have to ask if it is maybe better to use "pip" to build/install
> and not the the explicit "sip-install" step.

Both pip and sip-install are front-ends to the same back-end. pip 
supports downloading, sip-install is easier to use.

> The question is how can I throughput the "--confirm-license" option via
> "--global-config"? I don't know how.

The option is actually --config-settings...

     pip -v install --config-settings --qmake=/path/to/qmake 
--config-settings --confirm-license= /path/to/PyQt5-5.15.7.tar.gz

The -v is recommended but not required.

>> There are a lot of errors like this
>> 
>> Checking to see if the QtWinExtras bindings can be built...
>> /usr/bin/qmake QtWinExtras.pro
>> Info: creating stash file
>> /tmp/tmpuufb4hp1/cfgtest_QtWinExtras/.qmake.stash
>> Project ERROR: Unknown module(s) in QT: core gui winextras widgets
> 
> Please treat this as a feature request to improve the "how to build
> PyQt5". Nowhere there is mentioned wich libqt5* packages I need to
> install.

That is distro-specific.

> I installed hundreds of MB of qt packages via "apt-get install
> libqt5*". After that the build process stepped further and run some
> hours (because it is only a qemu emulated pcc64le machine).
> 
> At the end I have this error output.
> 
> 
> cp -f libpyrcc.so pyrcc.abi3.so
> make[1]: Leaving directory '/tmp/tmpc57aoiro/pyrcc'
> Installing the project...
> make install
> cd Qt/ && ( test -e Makefile || /usr/lib/qt5/bin/qmake -o Makefile
> /tmp/tmpc57aoiro/Qt/Qt.pro ) && make -f Makefile install make[1]:
> Entering directory '/tmp/tmpc57aoiro/Qt' mkdir: cannot create directory
> ‘/usr/lib/python3.8/site-packages’: Permission denied make[1]: ***
> [Makefile:365: install_target] Error 1 make[1]: Leaving directory
> '/tmp/tmpc57aoiro/Qt' make: *** [Makefile:91:
> sub-Qt-install_subtargets-ordered] Error 2 sip-install: 'make install'
> failed returning 2
> 
> I understand what happens here. But install PyQt5 as super user isn't
> an option. I want to install it as a user.
> The reasons for that need is that the package need to be visible in
> virtual environments (virtenv).
> 
> Can we solve this?

Either install sip in the venv or run sip-wheel instead of sip-install 
and use pip to install the resulting wheel.

Phil


More information about the PyQt mailing list