Python-How to use pyinstaller

Introduction

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.

Install pyinstaller

At the terminal

pip install pyinstaller

Enter. Then the installation will start.

Sample source code

sample.py


print("Hello!")
name=input("What's your name?")
print("Nice to meet you "+name+"!")

This time I will use this source code.

Source code exe

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.

Finally

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

Python-How to use pyinstaller
How to use xml.etree.ElementTree
How to use Python-shell
How to use tf.data
How to use Seaboan
How to use image-match
How to use shogun
How to use Pandas 2
How to use Virtualenv
How to use numpy.vectorize
How to use pytest_report_header
Easy to use Flask
How to use partial
How to use Bio.Phylo
How to use x-means
How to use WikiExtractor.py
How to use IPython
How to use virtualenv
How to use Matplotlib
How to use iptables
Reasons to use logarithm
How to use TokyoTechFes2015
How to use dictionary {}
How to use Pyenv
Easy to use SQLite3
How to use list []
How to use python-kabusapi
How to use OptParse
How to use return
How to use dotenv
How to use pyenv-virtualenv
How to use Go.mod
How to use imutils
How to use import
How to use Qt Designer
How to use search sorted
[gensim] How to use Doc2Vec
python3: How to use bottle (2)
Understand how to use django-filter
How to use the generator
[Python] How to use list 1
How to use FastAPI ③ OpenAPI
How to use Python argparse
How to use IPython Notebook
How to use Pandas Rolling
[Note] How to use virtualenv
How to use redis-py Dictionaries
Python: How to use pydub
[Python] How to use checkio
[Go] How to use "... (3 periods)"
How to use Django's GeoIp2
Easy to use E-Cell 4 Intermediate
[Python] How to use input ()
How to use the decorator
[Introduction] How to use open3d
How to use Python lambda
How to use Jupyter Notebook
[Python] How to use virtualenv
python3: How to use bottle (3)
python3: How to use bottle
How to use Google Colaboratory