Missing module `pyside2uic`

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
galou_breizh
Posts: 436
Joined: Wed Sep 15, 2010 9:38 am

Missing module `pyside2uic`

Post by galou_breizh »

In src/Gui/WidgetFactory.cpp, PySideUicModule::loadUiType the module pyside2uic is used. This module is not provided by any package on Ubuntu 20.04. The command `form, widget = gui.PySideUic.loadUiType('relative_path_to_ui_file')` then fails.

More details on https://github.com/FreeCAD/FreeCAD-macr ... definition.

Does anyone know how this could be elegantly solved? Even the example code on the official PySide2 documentation fails:

Code: Select all

from PySide2.QtUiTools import loadUiType

generated_class, base_class = loadUiType("themewidget.ui")
Gaël

OS: Ubuntu 20.04.2 LTS (i3/i3)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: e8566f22bbeb0b7204e3c45519d0963e8881100b
Python version: 3.8.5
Qt version: 5.12.8
Coin version: 4.0.0
OCC version: 7.5.1
Locale: English/United States (en_US)
User avatar
-alex-
Veteran
Posts: 1857
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: Missing module `pyside2uic`

Post by -alex- »

galou_breizh wrote: Tue Jun 01, 2021 8:42 am
You can maybe fix your issue by installing PyQt5 similar package then use symlinks.
See here: https://forum.freecadweb.org/viewtopic. ... 60#p396652 points 6- and 7-
galou_breizh
Posts: 436
Joined: Wed Sep 15, 2010 9:38 am

Re: Missing module `pyside2uic`

Post by galou_breizh »

Thanks for the quick reply but neither pyqt5-dev nor pyqt5-dev-tools provide the Python module pyside2uic.
User avatar
-alex-
Veteran
Posts: 1857
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: Missing module `pyside2uic`

Post by -alex- »

galou_breizh wrote: Wed Jun 02, 2021 7:33 am Thanks for the quick reply but neither pyqt5-dev nor pyqt5-dev-tools provide the Python module pyside2uic.
See here:
https://forum.freecadweb.org/viewtopic. ... 20#p395462
Post Reply