Unable to open .exe file - python

I wrote a python script for a calculator and tried to convert my .py file to a .exe file. After converting to .exe file, I am getting error("Failed to execute script <Filename>").
The solutions i have tried:
I tried to run my python3.8 script using 3.6 script.
I tried converting my .png icon to .ico image.
I tried to convert my .py file .exe file using pyinstaller & auto-py-to-exe as well.

Related

Error while generating executable files using py2exe (python)

I am trying to create an executable file which is using module python-docx.
The executable files is created but this error occurs when I run the executable file.
[Errno 2] No such file or directory: 'D:\Pycharm Projects\pydocx\dist\library.zip\docx\parts\..\templates\default-footer.xml'
The normal .py file which I am trying to convert into a .exe works perfectly fine.
Can anyone suggest how should I resolve this
Switched to pyinstaller and everything worked flawlessly.

PyInstaller Failed to execute script while converting from .py to .exe

I've been trying to convert a .py file to .exe which has some dependencies (.mp3 and .png files) that i've included while converting from .py to .exe with PyInstaller. The application runs completely fine on PyCharm and cmd venv,when activated. However when i try to run the .exe file i have this error: "Failed to execute script". I've tried everything on the internet but nothing seems to work
Apparently -w was causing a problem so i replaced it with -c and everything seems to be working normally now.

How to convert selenium python file to exe?

I am trying to convert python file to exe file. I've used pyinstaller.
Steps I followed:
I opened the cmd in the folder where is my script
I used the next command: pyinstaller --onefile -w name.py
And I got the below error when I want to open exe. I want to mention that I use selenium to open a Chrome Browser so chromedriver.exe is needed

.py to .exe with pyinstaller that can run on any PC

Well, I created a .py file which is a very simple login file. I converted it to exe and works fine on my computer. But when I send it to my friend, he cannot run the exe file because he doesn't have python installed in his pc and bin added to his computer's PATH.
So is there any way to create an exe file that can work on any other computer. Or we should install all the python and its used libraries.
By the way, I am using Python3.7, PyQt5 and pyinstaller for this application

How to run python converted .exe file in other system

In my system Python 3.6 is installed and I have converted my .py file to .exe in my system and the .exe is working fine. But the same .exe file is not working in other systems where Python is not installed.
Please let me know the procedure to run the .exe file without installing Python.
Thanks.

Categories