Designer can't find uic
-
Running;
Python 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)] on win32
pip==22.0.4
PySide6==6.3.2
PySide6-Addons==6.3.2
PySide6-Essentials==6.3.2
setuptools==58.1.0
shiboken6==6.3.2Running Lib\site-packages\PySide6\designer.exe
Form->View C++ Code or View Python code
Gives;
Unable to launch C:\Users\XXXXXXXX\Desktop.venv\Lib\site-packages\PySide6\bin\uic: Process failed to start: The system cannot find the file specified."
Note that uic.exe is located in ...\Lib\site-packages\PySide6 NOT in ...\Lib\site-packages\PySide6\bin in fact ...\Lib\site-packages\PySide6\bin does not exist.
Please change the path designer is using to locate uic
-
You don't need to run
Lib\site-packages\PySide6\designer.exe
, you need to executepyside6-designer
on the command line.Never execute anything you have inside
Lib\site-packages\PySide6\
that is not an example. That's why we providepyside6-uic/rcc/designer/assistant/...
-
@CristianMaureira Indeed pyside6-designer.exe instead of Designer.exe must be used, thanks for pointing that out. However pyside6-designer.exe has exactly the same problem as Designer.exe. pyside6-designer.exe also looks in the non-existing bin folder.
-
I'm sorry I thought your problem was mainly not being able to find the pyside6-designer.
I think the View Python code (and C++) code is a bug. Can you open a bug report for the 'designer' component under the QTBUG project?Out of curiosity, what's the use-case for viewing the Python code from designer?
Ideally, pyside developers create their interface with designer, generate a .ui file, then runpyside6-uic file.ui -o ui_file.py
so they can later import it from their main code.
https://doc.qt.io/qtforpython/tutorials/basictutorial/uifiles.html -
-
Sorry for digging out this post but I've just installed PySide6 and had similar problem with pyside6-designer launched from command line. I have temporary fixed it by making a link to venv\Lib\site-packages\PySide6\ inside that folder called bin.
mklink /D "bin" "c:\******\******\*******\venv\Lib\site-packages\PySide6"