Making exe file with the help of pyinstaller - python

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

Related

How to make executable works from python script?

I'm trying to make my python script executable file. However, when I convert it to exe with pyinstaller or py2exe, executable file does not work. I opened in cmd, no error but still does not work as i expected. On the other hand, when I start the actual python script, it works without a problem.
Here is what my folder structure looks like:
account_details.json
posts.xls
actual_python_script.py
What could be the problem and how can I solve this?

Converting a python file into executable file

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!

My exe created with pyinstaller flashes and terminates

I have written small code in python for data scraping using selenium, and BeautifulSoup.
The code is working great in pyCharm but when I convert my file from .py to EXE using pyinstaller example.py command, it converts correctly but the EXE file flashes and terminates and the code doesn't execute.
This is the result of the pyinstaller command:
This happens when there is an error being faced by the python script. Try running the .py module file in IDLE or by simple double clicking the .py .
I guess pyCharm creates a virtual environment which might be causing the issue.
Maybe try adding try/except for the code so that it doesn't flick away, rather shows the error.

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.

cannot start python newly made exe

I've written a GUI "app" with Python Tkinter and everything is working great. Then I used pyinstaller to make an EXE file out of it - again success. But when i try to run my app on another PC, nothing happens. No error, nothing. I've tried building a single EXE file using the --onefile option; I've tried not putting it all in one file --> on my machine it's working, on the otherS - not. I even copied the msvcr90.dll file and put it in the same directory as the executable - no success. Any ideas?

Categories

Resources