4

I've made a python program using Tkinter(GUI) and I would like to enter it by creating a dedicated icon on my desktop. (I want to send the file to my friend, without him having to install python or any interpreter)

the file is a some-what game that I want to share with friends and family, which are not familiar with coding.

2

2 Answers 2

2

You can simply use Pyinstaller to create a standalone .exe.

Run this from the Windows cmd to create a standalone executable file: pyinstaller.exe --onefile --noconsole --icon=your_image_here.ico app.py

Sign up to request clarification or add additional context in comments.

Comments

1

you can install Pyinstaller by using pip

pip install pyinstaller

go to the directory where your file is saved and type:

pyinstaller.exe --onefile --windowed path/to/your/file.py

--onefile (compresses your files into one .exe file) --windowed (removes the console when you run your file) path/to/your/file.py (or simply file.py when you want to convert the file in the same directory)

if you have any error using it, remove the --windowed flag and run file.exe on command line to see the error

3 Comments

Hey! when in the cmd of the directory, pyinstaller.exe is not recognized as an internal or external command. any idea?
please try instaling it on your system too. pip install pyinstaller in your cmd or in any other way
python -m PyInstaller, case-sensitive...

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.