converting python file contaong pyqt5 and mysql connector to .exe [duplicate] - python

This question already has answers here:
How can I convert a .py to .exe for Python?
(8 answers)
Closed 2 years ago.
Iam developing a python program which included pyqt5 and also mysql.connector for using mysql as back end.
I have almost completed the program and it contains about 20 .py files for different qt window.
How to convert this to .exe format?

Have you considered using Pyinstaller?
It's as simple as installing it:
pip install pyinstaller
and then running it against the name of your main python file. E.g., if it's called main.py:
pyinstaller --onefile main.py

Related

Python script multiexecution [duplicate]

This question already has answers here:
Create a single executable from a Python project [closed]
(3 answers)
Closed 1 year ago.
I want to execute three python script that I have developed. I found one doubt, how could I do it using a python script?
I want to convert it into a .exe, because our solution is thought to be executed in machines without python installed so having an unique script would be helpful.
Edit: I don't know the cause of the closure, I know how to use pyinstaller, my question was how can I execute 3 python using a python script or if it is possible.
Any suggestion? Thanks!
To package script and all dependencies you can use Pyinstaller, see here.
To execute multiple script (or exe) you can write a bat file that start the 3 exe or use them as services, based on your needs.
Use pyinstaller it can convert python to executables. You can get it up and running simply by doing
pip install pyinstaller
pyinstaller myfile.py

How do you set up a python project to be able to send to others without them having to manually copy and paste the code into an editor [duplicate]

This question already has answers here:
Create a directly-executable cross-platform GUI app using Python
(13 answers)
Closed 2 years ago.
I made a cool little project for my friend, basically a timer using tkinter, but I am confused on how to let them access this project without having vscode or pycharm. Is it possible for them to just see the Tkinter window or something like that? Is there an application for this? Sorry if this is a stupid question.
You can just built an .exe (Application) of your project. Then just share the application file and anyone can use the application through .exe. You can use pyinstaller to convert your python code to exe.
pip install pyinstaller
then cd to the project folder then run the following command
pyinstaller --onefile YourFileName.py
if you want to make exe without console showing up then use this command
pyinstaller --onefile YourFileName.py --noconsole

How to convert .py to .exe along with all its dependecies [duplicate]

This question already has answers here:
How can I make a Python script standalone executable to run without ANY dependency? [duplicate]
(19 answers)
Closed 2 years ago.
Suppose, I want to create a .exe file and i want all my features which are depended on certain packages or modules like tensorflow etc.So,how can i do this.
You can use something like pyinstaller, you can install it like this:
pip install pyinstaller
Once you install it, use this syntax to create to an exe:
pyinstaller yourprogram.py
This will create a .exe file from your program which will be in a dist folder and will include all dependencies along with it.
Additional documentation is avaialable here on how to include an icon etc.

Converting Python 3.6 script to .exe? [duplicate]

This question already has answers here:
How can I convert a .py to .exe for Python?
(8 answers)
Closed 5 years ago.
I would like to convert a .py file to an .exe. I am using Python 3.6. I already tried py2exe and PyInstaller but they don't seem to work properly with Python 3.6.
Here is the traceback from PyInstaller.
So, let's try Pyinstaller first.
$ pyinstaller script.py --onefile
This will generate a script.spec file
in the spec file you can remove the console, debug mode etc
$ pyinstaller script.py
EDIT: Py3.6 isn't supported
If this doesn't work then we can try cx_freeze,

Change python output script format to exe [duplicate]

This question already has answers here:
Create a single executable from a Python project [closed]
(3 answers)
Closed 9 years ago.
Is there any way or tool to automatically change python output script format (.py) to exe ? I want to run my app on every Windows computers including that haven't got installed python.
I had to do this a while ago and I had the most success with py2exe: http://www.py2exe.org/
You create a setup.py file which gives a list of what Python code you want to include in your executable, and it packages that up along with a subset of the Python interpreter into a single exe. Works specifically on Windows. (Linux and Mac generally already have Python installed so it's much less of an issue there.)

Categories

Resources