Application developed using pyinstaller is not working - python

I have written some code in python. It is working fine from command prompt. So, I have tried to create .exe application using pyinstaller. The command i used is:
pyinstaller --onedir --windowed Result_generator.py
The app is build successfully. But, when I open it, it is showing an error saying "Fatal Error" and was unable to execute it. It immediately shuts down when i open it. But the same code works fine using command prompt execution. Please help me with this. Thanks in advance!
Doubt:
I am using xlsxwriter package. Does it effect the application? Does pyinstaller work with python 3.6.4?

Related

The application has failed to start because its side-by-side configuration is incorrect (Python/ Pyinstaller/ Tkinter)

I programmed a small application and compiled it using pyinstaller. However I can't run my compiled .exe. It shows this error:
Does anyone know how to fix it and create a working .exe?
pyinstaller --noconfirm --onedir --windowed --icon " "
I had the exact same problem. For me it turned out to be a bug related to pyinstaller 4.7 and python 3.9.8. I uninstalled python 3.9.8 and installed 3.9.5 instead and it worked perfectly with pyinstaller -w, my exe file runs without a console window now, and without any errors.
This happens because of --windowed argument in Windows. Without it it compiles and works ok, but you need to keep the Command Prompt window open too. Still trying to find a work-around.

Convert Julia to EXE with help of PyInstaller

For a while now, I've been trying to compile a Julia package into an EXE with little success. Recently, I decided to take a look into wrapping it with Python and then transforming it to an EXE. This has worked great except the EXE crashes on startup show the attached error message. Can any of ya'll help me understand what the error is or even if this is the correct path? The error persists with the --onedir attribute as well.
In your command prompt,
pip uninstall typing
Then run your pyinstaller command again. It won't crash

Python exe not working without console but with console, it's working

I'm create a exe file with pyinstaller.I'm create with this command:
pyinstaller --onefile mybot.py
It's worked without showing any error. But I want without console so I'm used this command:
pyinstaller --onefile -w mybot.py
Now It's showing error on a popup: failed to execute script mybot
How can I solve the problem?
Your script had module run on console like os,... You may need to replace those module to another windowed module to support windowed executable
EDIT: You can use subprocess.Popen instead of os
I was facing a similar problem earlier. I was using PHPMyAdmin to store the database files. This is what worked for me. I stored the Database(sql) file in the same folder as the python file and changed the library I was using for accessing the sql file.
Then it worked perfectly for me. I think you need to make sure that all the files are in the same folder.

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 subprocess.checkout error

I developing a GUI app in Python, the code works fine in PyCharm IDE. Now I want to convert into an exe for distribution.
My code works fine until I generate a single file exe with PyInstaller with -w option enable (command: pyinstaller -F -w ). If I omit -w option, the code works fine but the final exe shows unwanted console as well.
To find a solution, I searched and found this to be a suitable workaround:
Python Subprocess Popen with Pyinstaller
Therefore, I tried Recipe sub-process as described here:
https://github.com/pyinstaller/pyinstaller/wiki/Recipe-subprocess
However, this is not working for me and I still get the error where subprocess command fails.
Anybody been in this situation, please help.
I am using Python 3.5, PyInstaller version 3.2.1.

Categories

Resources