Converting a python file into executable file - python

I build a simple bouncing ball game using python and kivy and the game is working properly without any errors. To add Gui I have used .kv file. Then I converted the Python file into an executable file using the pyinstaller module to convert the .py file I have used the statement pyinstaller -F PingPong.py
It has generated the .exe file but when I run the .exe file it just opens a black window and gets closed after few second.
Can anyone please tell me why is it behaving like this and how to convert the .py into .exe
Thank you!

Related

How to convert a python project (pycharm) into exe file

I've made a game Alien_Invasion using PyCharm IDE and pygame, and I want to convert all the project into an .exe file to be able to run the game on machines which doesn't have python or pygame.
I've tried pyinstaller but when it converts the main python file and I run it and it doesn't work.
Here is the link for my project:
https://drive.google.com/drive/folders/1-1gv4zRb-ZTK8NXEKPu7GSYxsownvJ-A?usp=sharing

The .exe file I converted from Pyinstaller can't be run

I have made a python file and it is a pygame. I want to convert it into a .exe file.
So, I used PyInstaller
I did pyinstaller --one file -w main.py
and it made a .exe file.
However, when I double-click it, it popped up a
Not Running warning
Why does it occur and what should I do to prevent it?

Making exe file with the help of pyinstaller

I wrote my GUI calculator with Python and Tkinter and now I'm trying to make exe file from my .py file. I'm using pyinstaller to do this, but when i compile my file and try to open it i get this error
But my program perfectly work when i run it in Pycharm. So, I just don't know what to do.
My code:https://github.com/Unknown-reader/Python-Calculator/blob/master/ffff.py

pyinstaller compiled .exe does nothing

Wrote a game and compiled it with pyinstaller. An EXE file was created but when I go to run it, it thinks for 3-4 seconds and then it returns to command prompt.
Clicking from the folder in Windows does nothing.
No errors, nothing! Do I need something in my code to allow this to run? The only imports are tkinter and random.
Edit 1: tested a "hello world" script to see if there were issues with pyinstaller, it ran fine.
I understand that the post is older, but it may be useful for other member who may come across the similar problem.
I had created a script using Jupiter notebook and it creates ipynb file.
When I create an exe file using pyinstaller, the exe was doing nothing.
I resolved it by first converting ipynb file to py file using below command:
pyinstaller my_script.py
It will create the py file under same location.
Now, execute below command to create exe file:
pyinstaller my_script.py
It will create exe file under dist folder.
And it works.

How to convert .py script and .ui file with images to .exe

I wrote a program in Python that includes external files, including images and a GUI .ui file.
I want to convert the Python script to a single executable (.exe) file using PyInstaller. When I try to open the .exe file, the program does not open.
You will need more information on why the application is closing immediately in order to solve your problem. To view the error messages associated with running your executable, run the .exe file from the command prompt: /path/to/app/dist/MyApp.exe. This will allow you to observe any errors that may exist after the app was bundled. If the program fails during an import statement, you may need to add a package to the hiddenimports list in the .spec file. Check the PyInstaller documentation for instructions on modifying the .spec file.

Categories

Resources