Ubuntu – PyQt5 – python-3.2 : no module available + pyuic5 cannot find PyQt5.uic module

debianinstallationpyqtpythonUbuntu

Trying to install PyQt5, the ''make install'' command ended by issuing a warning related to pyuic5 file format (see bellow)

the python path is set as

PYTHONPATH=/usr/lib/python3.2/site-packages/PyQt5

When testing I face these issues

modules not found

help('modules')

doesn't display any PyQt5 module

Conversion error

Trying to convert a .ui file to a python module

$  pyuic5 mywindow.ui -o mywindow_ui.py

results in

/usr/bin/python3: No module named PyQt5.uic

Can't convert UI nor embedded QT resources anymore (pyrcc5 fails as pyuic5)

Build

the build seems succesfull as the /usr/lib/python3.2/site-packages directory content is

/usr/lib/python3.2/site-packages/PyQt5$ ls
__init__.py               QtNetwork.so       QtSql.so
_QOpenGLFunctions_2_0.so  QtOpenGL.so        QtSvg.so
QtBluetooth.so            QtPositioning.so   QtTest.so
QtCore.so                 QtPrintSupport.so  QtWebKit.so
QtDBus.so                 QtQml.so           QtWebKitWidgets.so
QtDesigner.so             QtQuick.so         QtWebSockets.so
QtGui.so                  QtQuickWidgets.so  QtWidgets.so
QtHelp.so                 QtSensors.so       QtX11Extras.so
QtMultimedia.so           QtSerialPort.so    QtXmlPatterns.so
QtMultimediaWidgets.so    Qt.so              uic

Building environment

  • debian 7.5 (wheezy)
  • python3.2 standard package
  • SIP 4.16.1 from sources
  • Qt5.3 located at ~/Qt/5.3/gcc_64
  • PyQt5 from sources

Build sequence

In the extracted PyQt5 source directory

$ python3 configure.py --qmake /home/jeby6372/Qt/5.3/gcc_64/bin/qmake
$ make
$ sudo make install

make install log

make[1]: Entering directory `/home/jeby6372/pack/PyQt-gpl-5.3/pyrcc'
install -m 755 -p "pyrcc5" "/usr/bin/pyrcc5"
strip "/usr/bin/pyrcc5"
make[1]: Leaving directory `/home/jeby6372/pack/PyQt-gpl-5.3/pyrcc'
install -m 644 -p /home/jeby6372/pack/PyQt-gpl-5.3/__init__.py /usr/lib/python3.2/site-packages/PyQt5/
cp -f -R /home/jeby6372/pack/PyQt-gpl-5.3/pyuic/uic /usr/lib/python3.2/site-packages/PyQt5/
install -m 755 -p /home/jeby6372/pack/PyQt-gpl-5.3/pyuic5 /usr/bin/
strip /usr/bin/pyuic5
strip:/usr/bin/pyuic5: File format not recognized
make: [install_pyuic5] Error 1 (ignored)

Any idea to solve that ?

Best Answer

make: [install_pyuic5] Error 1 (ignored)

Just ignore it. Your installation is fine. Open Terminal:

$python
>>> import PyQt5.Qt

if there is no error show up, you are done.

Related Question