Сборка / изготовление PyQt5

761
ChrisW

Я пытаюсь собрать PyQt5 на Ubuntu 14.04; Я скачал архив, распаковал и запустил:

python configure --sip-incdir /home/chris/sip/sip-4.15.5/siplib make 

Configureзаканчивается хорошо ( --sip-incdirэто где я установил sip), но makeне завершается, с несколькими ошибками, такими как следующие:

 error: ‘SubdomainSetting’ is not a member of ‘QWebSecurityOrigin’ QWebSecurityOrigin::SubdomainSetting a2; 

( полный список ошибок из вывода на pastebin ). Любые идеи о том, как исправить наиболее ценится!

1

3 ответа на вопрос

1
Jerome

I see that there is some python3-pyqt5 packages for your distribution: (http://packages.ubuntu.com/search?keywords=python3-pyqt5). Maybe simpler to install it this way.

Also, maybe you want to use the "python" command, probably calls a wrong version of python (check if you have only one version or more and if this is the version needed by pyqt5).

For example, I had to compile/install two times: one for python-2.7, and an other for python-3.4. I use PyQT5 with python-3.4 and PyQT4 with python-2.7. For call the good command python, I would use in your case: python3.4 configure.

If this doesn't work, I think there are some compatibility problems.

In this case, just check all and go back to the first step installation (from all packages needed: python, QT, and dependencies).

0
karel

Вам будет легче, если вместо того, чтобы пытаться собрать PyQt5 из архива PyQt-gpl-5.2.1.tar.gz, вы установите PyQt5 версии 5.2.1 (та же версия) непосредственно из репозиториев Ubuntu 14.04. Откройте терминал и введите:

sudo apt install python3-pyqt5 

PyQt5 предоставляет доступ к API Qt5 для Python 3. Этот пакет содержит следующие модули: QtCore, QtDBus, QtDesigner, QtGui, QtHelp, QtNetwork, QtPrintSupport, QtTest и QtWidgets.

Чтобы также установить файлы разработки для PyQt5:

sudo apt install pyqt5-dev 
0
Artur Gaspar

Get the patched PyQt5 from http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/trusty/pyqt5/trusty/tarball/14?start_revid=14 (or with bzr branch lp:ubuntu/trusty/pyqt5), and run configure.py with Python 2.

I also had sip (python-sip-dev) installed with apt-get so I used python configure.py --sip-incdir=/usr/include/python2.7 instead.