K
K
kibergile2020-04-16 16:24:26
Python
kibergile, 2020-04-16 16:24:26

UI compilation error in py, how to fix it?

Ku forum users, in general, I wanted to make NOT a console application in python (3.8.2). I threw in the interface, I'm trying to compile ui in py (using this command - pyside2-uic "C:\Users\Fox\Desktop\project R\calc\gui.ui" -x -o "C:\Users\Fox\Desktop\ project R\calc\calc.py" ) and get an error

spoiler
Traceback (most recent call last):
File "c:\users\fox\appdata\local\programs\python\python38-32\lib\runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\fox\appdata\local\programs\python\python38-32\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\Fox\AppData\Local\Programs\Python\Python38-32\Scripts\pyside2-uic.exe\__main__.py", line 5, in
File "c:\users\fox\appdata\local\programs\python\python38-32\lib\site-packages\PySide2\__init__.py", line 88, in
_setupQtDirectories()
File "c:\users\fox\appdata\local\programs\python\python38-32\lib\site-packages\PySide2\__init__.py", line 50, in _setupQtDirectories
for dir in _additional_dll_directories(pyside_package_dir):
File "c:\users\fox\appdata\local\programs\python\python38-32\lib\site-packages\PySide2\__init__.py", line 22, in _additional_dll_directories
raise ImportError(shiboken2 + ' does not exist')
ImportError: c:\users\fox\appdata\local\programs\python\python38-32\lib\shiboken2\libshiboken does not exist

Tried with another command pyuic5 gui.ui -o calc.py. the error says that I don't have PyQt5.sip (ModuleNotFoundError: No module named 'PyQt5.sip'), I try to install this module and get an error: Microsoft Visual C++ 14.0 is required. What to do? this is the first time I hear about vc 14 version, and I still can't find how to install it anywhere... Maybe it's a bad idea to try pyqt and some other framework is better? But what? I need to be able to design like in pyqt...

Thanks in advance for your answer!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Karbivnichy, 2020-04-16
@kibergile

You need to install Microsoft Visual C++ 14.0. Only not Redistributable, but Microsoft Visual C++ Build Tools .

A
Andy_U, 2020-04-16
@Andy_U

pip install shiboken2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question