pyinstaller program errors when i try to open it - python

I ran the command pyinstaller --onefile -w file.py. It worked, so like any other person I instantly went to test it. But when I ran it it gave me a error saying failed to execute script file inside of a windows error message. I went to run the python script and it worked. I tried to run it with the console by running the command pyinstaller --onefile file.py and it gave me the same issue.

If you run the bundled application (not the script) from the console like file.exe on Windows or ./dist/file on Ubuntu you will see the actual source of the issue in the console. This will help you to resolve it.

I used docker because It was build exe from mac os. see more https://hub.docker.com/r/cdrx/pyinstaller-windows

Related

Running python in vscode terminal

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.

Problem executing "Pyinstaller" from command prompt

I am using cmd to install pyinstaller, the installation went fine but the moment I tried to turn a .py file to .exe an error appeared:
"pyinstaller" is not recognized as an internal or external command,
executable program or batch file.
This has never happened before.Thanks for helping.
Try,
python -m pyinstaller yourPythonFile.py

Compile python with Pyinstaller failure : Failed to execute script Myfile

After I compile myfile.py to exe with pyinstaller to one file, that file is working on my computer but not on others' computers.
error >>> Failed to execute script Myfile
I use this command
pyinstaller --onefile Myfile.py
Build your exe with --debug=all and run it in a console. Provide the output to help people help you.
Refer to https://pyinstaller.readthedocs.io/en/stable/when-things-go-wrong.html#getting-debug-messages to get more details if needed

Pyinstaller on Linux - How to show a console

I'm trying to generate a Python executable file with Pyinstaller on Linux. For this purpose I'm trying this implementation with a simple 'Hello World' file.
The issue I'm having is that when the executable file is generated and I execute it (double-click), nothing happens. There is no console popping out and I can see no execution. I have read in the documentation that in MacOS and Windows there are explicit options in order to make this console appear or not, but not in Linux.
Any idea?
You should open your console, and use "python file.py" or "python3 file.py" command (it depends on Python version), where file.py is your file.
I hope that I helped.

How do I run a Python 3.5 program that uses Tkinter on a computer without Python installed?

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.

Categories