Have you ever wanted to turn a program written in Python into an exe file? This time, I will show you how to use pyinstaller to turn a Python program into an exe file.
At the terminal
pip install pyinstaller
Enter. Then the installation will start.
sample.py
print("Hello!")
name=input("What's your name?")
print("Nice to meet you "+name+"!")
This time I will use this source code.
At the terminal
pyinstaller sample.py
Enter. This will not be a single file,
pyinstaller sample.py --onefile
If you do like this, it will work with only one file.
pyinstaller may take a long time to create a file, or it may take a long time to start executing the created exe file. I recommend pyinstaller because it's still easy to do.
Recommended Posts