May 05, 2018

PyInstaller : Convert .py to .exe

PyInstaller usage

❑ PyInstaller converts Python programs to stand-alone executables.

❑ Feature
❍ Converting is available in Windows, Linux, Mac OS X, FreeBSD, Solaris and AIX.
* This depends on the environment in which PyInstaller is run. For example, you can not convert to elf on Windows.
❍ It supports Python 2.7 and Python 3.3~3.6
❍ There is no need to make a setup file.

❑ How to install(Windows)
2. Append the path of the Python to PATH environment variable.
* In my case, I appended "C:\Python27\Scripts" and "C:\Python27\Scripts"
3. Open CMD with administrator permission then Install PyInstaller : pip install PyInstaller
4. Use PyInstaller with the below usage.

※ If you meet an error as below, just reinstall the Python. Remove it in "Programs and Features" then remove the installed path.

Could not fetch URL https://pypi.python.org/simple/pyinstaller/: There was a problem confirming the ssl certificate: [Errno 1] _ssl.c:507: error:1407742E:SSLroutines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version - skipping Could not find a version that satisfies the requirement pyinstaller (from versions: ) No matching distribution found for pyinstaller

❑ How to install(Linux) : $ sudo pip install PyInstaller

❑ How to use : pyinstaller -F [Python program].py