When I have subprocess.check_output function in mycode and I generate an .exe file using pyinstaller with
python pyinstaller.py --noconsole -F myprogram.py
process stop to work, otherwise every thing is ok!
Do you know any solution with pyinstaller or replace subprocess library with some thing else?
Related
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..
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.
I have written a Python (v3.8.1) Python program which relies on a c compiled .exe program. The Python script itself works as expected and I am ready to package it for use within Windows, in environments where Python is not installed.
I want to wrap both programs together under one .exe if possible and practical.
Based on a comment, I have gone through the compiling process with Pyinstaller using the following commands:
pyinstaller myprogram.py --hidden-import notional_library --add-data
compiled_c_program.exe;. --add-data dependency.COF;. -w -D
And the program works perfectly. However, when I change -D to -F to create a onefile.exe, the program breaks along the lines of the compiled c program, which is confirmed when I debug the program.
I have also tried adding the c program as a binary, but that does not work either.
Placing the dependencies in the same folder does work, and is an amenable solution, but I would still prefer to wrap both programs into a single executable if possible.
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?
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.