PyInstaller庫的安裝
(cmd命令行) pip install pyinstaller
如果安裝失敗
python 3.8 不兼容。
解決方案:安裝和使用pyinstaller 4.0 development開發包
# pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz
查看pip庫
# pip list
使用pyinstall將.py文件打包可執行文件.exe
(cmd命令行) ,cd:進入安裝了Pyinstall的目錄D:\python3\Scripts,然后輸入
pyinstaller -F D:\python3\MOOC\test1.py
![]()
回車后出現一串信息

已結成功生成了exe文件和它的地址(開頭是7649的那一行)
PyInstaller庫常用參數

添加文件圖標
轉換ioc圖片網站:http://www.bitbug.net/

pyinstaller-F <文件名.py>
pyinstaller–icurve.ico –F SevenDigitsDrawV2.py

