Pyinstaller program fails to run - python

for some reason i cant run a program that i have "compiled" using Pyinstaller.
I have used the following command to make the exe file:
pyinstaller -F logFileHandler.py
I have also tried:
pyinstaller -F --onefile --windowed logFileHandler.py
but that did not work either.
As i understand the -F and --onefile is more or less the same?
The error i get when i try to run the program is:
As far as i can see the problem is with Pandasgui
and it is looking for some weird theme..

Related

pyinstaller program errors when i try to open it

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

Im trying to turn a python file into an exe file and its not working

I tried making my python file into an exe using pyinstaller main.py --onefile --noconsole
.I was getting an error when I tried opening the exe from dist so i used --debug=all and it said pyinstaller: error: the following arguments are required: scriptname.
What exactly do i do im not too sure as its my first time.
To convert a python file to exe:
Make sure you have pyinstaller installed and up to date
pip install pyinstaller
in PowerShell type the following:
pyinstaller --onefile -w 'youfilename.py'
The file name should come out as 1.exe
Make sure are in the right directory
If you have more doubts use this link: https://www.geeksforgeeks.org/convert-python-script-to-exe-file/

pyinstaller working but .exe application not staring up

I tried to convert my python gui application (.py ) to an executable file(.exe) using the pyinstaller module. I ran the following command in the terminal -
pyinstaller.exe --onefile -w sourcecode.py
The process was completed successfully and I got the .exe file(sourcecode.exe) along with the extra folders like pycache and sourcecode. But when I tried to run the .exe file/application by double clicking on it the app didn't start up and gave an error. Please help.
Try adding this --hidden-import to pyinstaller.exe --onefile -w sourcecode.py in case of hidden modules.
You can also try adding --debug to see what the error actually is.

Do not show console with .exe created by Pyinstaller

I want to create a very simple .exe which runs another .exe that exist on a shared server. The reason for this is so I can update the .exe on the server without having the users having to update their app. I hope that makes sense..
Anyway, I can't seem to figure out how to get rid of the console that pops up.
The script that calls the program on the server is just:
import os
os.system('U:/.../Program.exe')
And I create both .exe by running:
pyinstaller -w -F -i image.ico name.py
(-w should remove console)
I've also tried:
pyinstaller -w -F -i image.ico --noconsole name.py
without success.
Any help is greatly appreciated!
Have you tried placing the --noconsole argument to the right of the target?
So it'd read pyinstaller -w -F -i image.ico name.py --noconsole?

Pyinstaller - multiple python scripts

I have two Python scripts which produces a GUI and runs code off some of the buttons. When run from Python, I run mainImpactTool.py which then runs impactTool.py to produce the GUI.
mainImpactTool.py
impactTool.py
I followed the guidance here:
https://pythonhosted.org/PyInstaller/usage.html#what-to-bundle-where-to-search
So I could create a single executable for running on Windows.
If I had one script I would normally run:
Pyinstaller --onefile mainImpactTool.py
However, to use two scripts, I did this:
Pyinstaller --onefile mainImpactTool.py impactTool.py
Pyinstaller works, but when I run the .exe file I get the error:
ImportError ... Failed to execute script mainImpactTool
Any suggestions on what I am doing wrong?
Thank you
Pyinstaller --onefile mainImpactTool.py
Try this it will work. Pyinstaller will recurse over all your imports(impactTool.py) and include it in the .exe.

Categories