сбой sip-установки с кодом выхода 1 и неясным сообщением об ошибке

#python #pyqt #pyqt5 #pyqtdeploy

#python #pyqt #pyqt5 #pyqtdeploy

Вопрос:

Я пытаюсь запустить pyqtdeploy и получаю неясное сообщение об ошибке. Я загрузил все зависимости и попытался создать демонстрационное приложение с:

 python build-demo.py --verbose
 
 Running 'make install'.
/home/argosopentech/run/demo/sysroot-linux-64/Qt/bin/qmake -install qinstall libsip.a /home/argosopentech/run/demo/sysroot-linux-64/lib/python3.7/site-packages/PyQt5/libsip.a
PyQt: installing component...
PyQt: looking for 'pyqt-commercial.sip' in /home/argosopentech/run/demo.
PyQt: looking for 'PyQt5-5.15.2.tar.gz' in /home/argosopentech/run/demo.
PyQt: reading 'https://pypi.org/project/PyQt5/5.15.2/'.
PyQt: downloading 'PyQt5-5.15.2.tar.gz' from https://files.pythonhosted.org/packages/28/6c/640e3f5c734c296a7193079a86842a789edb7988dca39eab44579088a1d1/...
PyQt: downloaded 'https://files.pythonhosted.org/packages/28/6c/640e3f5c734c296a7193079a86842a789edb7988dca39eab44579088a1d1/PyQt5-5.15.2.tar.gz'.
PyQt: copying /home/argosopentech/.pyqtdeploy/cache/PyQt5-5.15.2.tar.gz to /home/argosopentech/run/demo/sysroot-linux-64/build.
PyQt: unpacking 'PyQt5-5.15.2.tar.gz'.
Running 'sip-install --qmake /home/argosopentech/run/demo/sysroot-linux-64/Qt/bin/qmake --no-distinfo --concatenate 2 --no-docstrings --verbose'.
Querying qmake about your Qt installation...
/home/argosopentech/run/demo/sysroot-linux-64/Qt/bin/qmake -query
This is the GPL version of PyQt 5.15.2 (licensed under the GNU General Public License) for Python 3.8.5 on linux.
Found the license file 'pyqt-gpl.sip'.
These bindings will be built: QtCore, QtNetwork, QtGui, QtWidgets, QtX11Extras.
Generating the QtCore bindings...
Generating the QtNetwork bindings...
Generating the QtGui bindings...
Generating the QtWidgets bindings...
Generating the QtX11Extras bindings...
Generating the .pro file for the QtCore module...
Generating the .pro file for the QtNetwork module...
Generating the .pro file for the QtGui module...
Generating the .pro file for the QtWidgets module...
Generating the .pro file for the QtX11Extras module...
Generating the top-level .pro file...
Generating the Makefiles...
/home/argosopentech/run/demo/sysroot-linux-64/Qt/bin/qmake -recursive PyQt5.pro
sip-install: '/home/argosopentech/run/demo/sysroot-linux-64/Qt/bin/qmake -recursive PyQt5.pro' failed returning 3
Info: creating stash file /tmp/tmp0u30e4ly/.qmake.stash
Reading /tmp/tmp0u30e4ly/QtCore/QtCore.pro
Reading /tmp/tmp0u30e4ly/QtNetwork/QtNetwork.pro
Reading /tmp/tmp0u30e4ly/QtGui/QtGui.pro
Reading /tmp/tmp0u30e4ly/QtWidgets/QtWidgets.pro
Reading /tmp/tmp0u30e4ly/QtX11Extras/QtX11Extras.pro
Project ERROR: Unknown module(s) in QT: x11extras
pyqtdeploy-sysroot: execution of 'sip-install' failed: returned exit code 1
 

Полный код

Комментарии:

1. Проблема в том, что вам не хватает модуля «x11extras», как вы установили Qt? Использовали ли вы онлайн-установщик или репозитории вашей операционной системы?

2. Я попытался установить qt sudo apt-get install qt5-default , но получил ту же ошибку. Я пытаюсь собрать qt из исходного кода как часть pyqtdeploy.

Ответ №1:

Решением было установить PyQt x11extras для Python3, который является его собственным пакетом Debian:

 sudo apt-get install -y python3-pyqt5.qtx11extras