Installed pyqt5 and qt Designer. Made a test program, after which it was necessary to translate it into python code. I started looking for how to do this, it says about the pyqtc5.exe file, I did not find it, but I found pyqtc5.bat. Then, as stated in the tutorial, I went to that folder, wrote a command, but it produces such an error.

enter image description here

I was in the directory, where pyqtc5.bat, also threw the file with the test program there.

  • not really to the topic, but why not use the package "anaconda" there is just pyqt there. Not have to dance with a tambourine looking for batch file. - timob256
  • @ timob256 is a handy guide where everything is painted on this topic? - user277573
  • Actually, you need pyuic5.exe . pyuic5.exe test.ui -o test.py -x . Where it lies with you and whether access to it is registered is another question. I have it on the path: E:\Python\Scripts\pyuic5.exe - S. Nick
  • try this - timob256
  • With an anaconda, everything is easier there is no need for guides. - timob256

1 answer 1

HER so: 3

enter image description here

Team :

 С:\Games\Anaconda3_work>C:\Anaconda3\Library\bin\pyuic.bat C:\Games\Anaconda3_work\ untitled.ui -o C:\Games\Anaconda3_work\untitled.py 

I did not work, but I did not give any errors.


Put Anacond-y third, with all Qt libraries. In the anaconda designer.exe is .. \ Anaconda3 \ Library \ bin.

I do everything myself according to the book Python3 and PyQt5 Application Development Prohorenok N., Dronov V.

It is written there.

To generate a python program, run the command: pyuic5.bat MyForm.ui -o ui_MyForm.py

enter image description here


After installing Anacondas, it is imperative to add the location of the anaconda, or rather its executive files, to the “environment variables”.

enter image description here


Ps I switched to the anaconda because libraries are not as easy to install as they are written in books (with the dependency of libraries it is very huge and it is not always possible to load and install the library correctly)