python 生成可執行文件步驟

python 生成可執行文件步驟

1.首先寫一個簡單的python腳本

import time

if __name__ == '__main__':
    print("hello world")
    time.sleep(10)

2.安裝PyInstaller

pip3 install pyinstaller

3.執行打包命令

pyinstaller test.py

錯誤:AttributeError: module ‘enum’ has no attribute ‘IntFlag’

卸載enum34庫

pip uninstall enum34
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章