I have been trying for a long time to generate a python code frome qtDesigner but I always have the same issue :
The command I used : pyuic5 ExtraInfo_Design.ui -o ExtraInfo_Designui.py
Fatal error in launcher: Unable to create process using '"c:\users\Dorian\appdata\local\programs\python\python37-32\python.exe" "C:\Users\lDorian\Desktop\extrInfo\pyuic5.exe" ExtraInfo_Design.ui -o ExtraInfo_Designui.py'
I think that all these problems happen because I changed the name of my laptop so I have other files that had been created "lDorian".
I have tried to open the shell as ana administrator.
I had tried to generate the code from a (.bat) file.
I had tried to add python path to the path directory.
Thanks, folks.
As far as I get it from your question and the error message, you changed your laptop username from lDorian to Dorian . For programs that set the path variable during installation, this is now wrong as you see in your error message.
For python the path starts with "c:\users\Dorian", for pyuic5 it start with "C:\Users\lDorian" which I guess is the user that does not exist anymore.
The python path you changed, so it looks fine now. Also change the path for pyuic5 and it should work.
If you still encounter problems, a clean reinstall of python and qt should do the job and might be faster than searching for all misset paths.
After reinstalling Anaconda and all the version of python/pyqt that I already have,
I opened the cmd on Windows but I had the same problem.
The solution is:
After reinstalling all and deleting the python link in the path environment.
Open the Anaconda Powershell Prompt (not Anaconda Prompt) as an administrator
Type pip install pyqt5
then run : pyuic5 fileName.ui -o fileName.py
Have a nice day.
Related
I recently change my laptop, windows to mac.
I downloaded python and vscode and install python extension as i did on windows.
Then i edited task json file to use cmd +shift +b for building shortcut.
However when i build the file, there's an error saying on terminal "zsh:command not found:python".
What should i do?
I researched and knew maybe i have to change default app, python to python3, but don't know how.
Actually i'm not certain this is the problem.
You need to add python to zsh by running the following in the terminal:
echo "alias python=/usr/bin/python3" >> ~/.zshrc
I want to run python on vscode terminal but when i try to do so i get the following:
I use the code runner extension and i am enabling 'run code in terminal'option.
It used to work for me, but i have tried recently to run python on windows terminal by copying the entire thing vscode generates in it's terminal when building the executable(the path and everything) and pasting it to windows terminal, didn't work.
This is what i pasted: C:\Users\Yan\AppData\Local\tmc\vscode\mooc-programming-22\part05-27_letter_square> python -u "c:\Users\Yan\AppData\Local\tmc\vscode\mooc-programming-22\part05-27_letter_square\src\letter_square.py"
Please tell how to fix this and if what i did is the cause, then tell me also how to run python on windows terminal without causing this problem.
The command pasted to the windows terminal has somehow created a file named "python" (with no extension) in the "System32" folder.
Delete the file and the problem is solved.
I want to use pyinstaller to make standalone exe files. I used
pip install pyinstaller
first, then I got an error message I will show you in a second, so I used
pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip
because I found it on a pyinstaller website. So I cd into the folder my script is in, and I think you don't need a setup.py file or anything for pyinstaller like you would need using py2exe, then I use the command
pyinstaller file.py --onefile
and I get the error message (I am translating the last part so it is not 100% accurate)
Fatal error in launcher: Unable to create process using '"c:\python\python.exe" "C:\Python\Scripts\pyinstaller.exe" gtaReminder.py --onefile': System could not find the specified file.
I think pyinstaller thinks that python.exe is located in c:\python\python.exe as it says in the error message. I just opened the path and it is not. Can I somehow change this path pyinstaller thinks it can find python.exe in? I am using python 3.6.2, pip 20.3.3 on windows 10.
Firstly, your command line syntax is wrong, it is always supposed to be optional arguments followed by the mandatory arguments, below is the general syntax
pyinstaller [options] script [script …] | specfile
Read the documentation here.
The correct command should be
pyinstaller --onefile file.py
The error does not suggest that pyinstaller has got the wrong python file, the fact that it could tell
Unable to create process using '"c:\python\python.exe" "C:\Python\Scripts\pyinstaller.exe"
means that it was able to find the python file and tried initiating the process but failed to perform the task altogether.
So I have a program and whenever I start it from the command line it works totally fine. What I need now is an Executable and therefor I tried to do it with pyinstaller, which analyzes normally automatically which modules have been imported and it works fine with all of the modules except for autoit. The way I import it looks like that:
import autoit
So I tried to make an executable by following command:
pyinstaller --onefile ./rocketupload.py
Which gave me this Error (Excuse me, that I have to make a screenshot, but the window was open for a second and closed immediately afterwards, so I was not able to copy and paste it here):
I was able to create a functioning exe by copying the autoit dll to the path mentioned in the Error, but that is just a temporary solution, since I want the executable to be running not only on my PC.
I've also tried this one without succes:
pyinstaller --hidden-import=autoit --onefile --paths c:\users\semjo\appdata\local\programs\python\python37\lib\site-packages\autoit\lib .\rocketupload.py
So the problem here is that the autoit module does not get copied from pyinstaller so It cannot run the executable as inteded. But I dont know how to solve it, so that the exe can run as intended. Hope you can help me here, tried to find a solution for hours now...
I had also encountered the same problem and i solved it by implementing the follows:-
Re-installed the pyinstaller module using the latest installer available in github i.e. pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip
Re-created the executable package by running the command i.e. pyinstaller --hidden-import=selenium --hidden-import=autoit your [python_file.py]
Copied the installed module i.e. autoit's folder from my PC's directory (C:\Users\\AppData\Local\Programs\Python\Python37\Lib\site-packages) and pasted it inside the [python_file] folder in dist folder which was generated by pyinstaller.
To test the solution, i re-run the generated .exe file in command prompt. Hope this help.
hiddenimports = [ "autoit.init", "autoit.autoit", "autoit.control",
"autoit.process", "autoit.win" ]
datas = [
[
"C:\\Python27\\lib\\site-packages\\autoit\\lib\\AutoItX3_x64.dll",
"autoit\\lib"
]
]
https://raveendran.wordpress.com/2012/06/15/how-to-installregister-autoitx3-dll/
Do this two process your issue will resolve. It resolved me.
I have coded a program in Python 3.5 that uses the Tkinter import. I'm trying to figure out a way to run it on computers that don't have Python. First I tried freezing it but I haven't been able to because none of the freezing tools I found support Python 3.5. Then I tried possibly using a online idle but I couldn't find any that support Tkinter. I would prefer to be able to get a .exe file or something similar but if I could run it online that would be good too any ideas?
EDIT
So I have now successfully downloaded PyInstaller using pip. My current problem is when I type this into the console: pyinstaller.exe --onefile --windowed Finder.py
I get this error: 'pyinstaller.exe' is not recognized as an internal or external command,
operable program or batch file.
EDIT
I have now found the pathway to pyinstaller.exe. Now when I try to use it it says Access is denied.
I finally figured it out after about three days of work. Fist I downloaded PyInstaleller in the zipped form and extracted it. Then I put my program in the PyInstaller folder. Then I opened a regular command prompt. I then typed cd then the location of the PyInstaller folder. Finally I typed pyinstaller.py --one file --windowed program.py. Then when I went into the PyInstaller folder there was a folder called program with the .exe file in the dist folder. Thanks everyone for all of your help!
You can use pyinstaller to do that. I think its work fine on linux em linux.
Another option is use py2exe.
Try pyinstaller -F -w Finder.py as the command or you could check out CxFreeze.