python打包成執行程序的模塊PyInstaller安裝及使用
本文環境windows,python已經安裝。
PyInstall模塊安裝
直接在python安裝目錄下有個Scripts目錄執行命令(以C:\Python27\Scripts目錄爲例)
pip install PyInstaller
將python打包成執行程序
//hello.py
# -*- coding: utf-8 -*-
print("Hello, World!")
命令:
E:\>python -m PyInstaller -F E:\\hello.py
上圖紅框爲執行程序的輸出路徑,嘗試執行:
完成。