1. 程式人生 > >python 使用 pyinstaller打包python程式到exe

python 使用 pyinstaller打包python程式到exe

環境:python 3.6.4  

安裝 pyinstaller :pip install pyinstaller

在py檔案所在的目錄執行: pyinstaller -F xx.py

此時會在當前目錄下生成一個build和一個dist目錄,去dist目錄下找到xx.exe。點選執行即可。可以拷出來exe檔案在沒有python的電腦上單獨執行