pyuic5 works on one machine but not another [duplicate] - python

I want to convert my .ui file to py but pyuic5 is not recognized
And when i go to my python directory this error message appears
how to fix this error?

A more generic option is:
python -m PyQt5.uic.pyuic filename.ui -o filename.py -x

Related

pyuic5 command not found , I did everthing and still get this same error

I installed the designer from sourcefourge.net and installed the packages using pip , i also have the pyuic5.exe file in my scripts file , iam really confused
How can i solve this issue?
I got the same problem. In my case, for some reason, .ui file was crashed. So, I saved .ui file again in QT Design and run again the command into the files directory:
pyuic -x file.ui -o file.py
This solved my problem.
[]'s

labelImg: 'pyrcc5' is not recognized as an internal or external command

I'm trying to install lalbelImg for The Tensorflow Object Detection API.
Everything is going well until I try to run the command:
pyrcc5 -o libs/resources.py resources.qrc
It give me error:
'pyrcc5' is not recognized as an internal or external command,
operable program or batch file.
I'm on Windows 10 and have Python 3.5.4
I'm following the tutorial for windows on tzutalin's Github.
Link: https://github.com/tzutalin/labelImg#user-content-windows
PS: I don't use Anaconda.
Turns out I have to give the full directories.
C:\Python35\Scripts\pyrcc5 -o C:\Desktop\labelImg\libs\resources.py C:\Desktop\labelImg\resources.qrc
Copy Paste that and change the directories if needed.
Have an awesome day! - CodeLover
This Worked for me
"C:\Users\Saran\anaconda3\Library\bin\pyrcc5.bat" -o libs/resources.py resources.qrc
That means you didn't specify the path
To set the path
Search for edit environment variable -> environment variable -> new -> here add path of that
This error occurred when path is not specified
Not a Problem
Just find the pyrcc5.exe file from your search bar then copy it and paste it in your labelimg folder or where you have downloaded all other files from github
copy the path of labelimg extracted file and paste it in anaconda prompt. e.g
(base) C:\Windows\system32>cd C:\Users\sadda\Desktop\labelImg-master
this is the path of the labelimg : cd C:\Users\sadda\Desktop\labelImg-master
then,
copy and paste the : pyrcc5 -o libs/resources.py resources.qrc
C:\Users\sadda\Desktop\labelImg-master>pyrcc5 -o libs/resources.py resources.qrc
The following code worked for me. Try to find the location of pyrcc5 file, resources.py and resources.qrc file then change it according to your location.
C:\Users\lenovo\miniconda3\envs\labelme\Scripts\pyrcc5.exe -o
F:\labelmg_master\labelImg\venv\Lib\site-packages\pip\_vendor\distlib\resources.py
F:\labelmg_master\labelImg\resources.qrc
if you are using anaconda, download PyQt library using below command
conda install pyqt=5
Go to the labelImg folder and use the following command (replace your user name in the drive)
C:\Users\vigneh\anaconda3\pkgs\pyqt-5.9.2-py39hd77b12b_6\Library\bin\pyrcc5 -o resources.py resources.qrc
In my case I was trying to use pyrcc5 outside of the virtual environment PyQt5 was installed in.

How to transform a .ui to a .py on mac

I need to transform an .ui archive to a .py but I can't use the command pyuic4, it said command not found in the terminal.
I already try installing pyside, pyqt, use uic.py but nothing seems to work.
So, I finally solved it. I used pyuic5 -x Data.ui -o Data_ui.py in the terminal, but first I opened the folder where the executable pyuic5 was, paste Data.ui and then use the line pyuic5 -x Data.ui -o Data_ui .py. Remember to open the location of the executable in the terminal before using the command

Do not show console with .exe created by Pyinstaller

I want to create a very simple .exe which runs another .exe that exist on a shared server. The reason for this is so I can update the .exe on the server without having the users having to update their app. I hope that makes sense..
Anyway, I can't seem to figure out how to get rid of the console that pops up.
The script that calls the program on the server is just:
import os
os.system('U:/.../Program.exe')
And I create both .exe by running:
pyinstaller -w -F -i image.ico name.py
(-w should remove console)
I've also tried:
pyinstaller -w -F -i image.ico --noconsole name.py
without success.
Any help is greatly appreciated!
Have you tried placing the --noconsole argument to the right of the target?
So it'd read pyinstaller -w -F -i image.ico name.py --noconsole?

Tell the shell to use a certain python.exe

In my command shell (cmd) I try to convert an .ui file to a .py file via
pyuic4 C:\Test\gui.ui > C:\Test\gui.py
But it says:
The command C:\Python27\python is either typed wrong or could not been found
I am using the Anaconda distribution which is placed under AppData/Local/Continuum/Anaconda and there is a python.exe.
Changing the directory does not work.
How can I compile my .ui-file?
Use OSGeo4W shell instead of cmd, it can easily convert the .ui file to .py
Run the following command in OSGeo4W shell:
C:\path\to\my\ui\files\>pyuic4 -o ui_form.py form.ui
Hope this helps!

Categories