控制檯輸入
pip3 install pyinstaller
輸入命令 pyinstaller,回車顯示安裝成功
輸入
pyinstaller --noconsole --onefile main.py
開始打包
在當前項目的dist文件夾下生成main.exe
Pycharm添加工具
詳細參數:
Name:pyinstaller
Program:C:\Users\HTC\Anaconda3\Scripts\pyinstaller (Anaconda3的安裝位置)
Arguments:--noconsole --onefile $FileName$
Working directory:$FileDir$