pyinstaller發布軟體命令

2021-09-24 12:51:27 字數 733 閱讀 8364

進入控制台,輸入

pyinstaller -f -i ***.ico ***.py
將生成exe檔案所需要的如txt,ini等檔案放到索引目錄下,

-h,--help

檢視該模組的幫助資訊

-f,-onefile

產生單個的可執行檔案

-d,--onedir

產生乙個目錄(包含多個檔案)作為可執行程式

-a,--ascii

不包含 unicode 字符集支援

-d,--debug

產生 debug 版本的可執行檔案

-w,--windowed,--noconsolc

指定程式執行時不顯示命令列視窗(僅對 windows 有效)

-c,--nowindowed,--console

指定使用命令列視窗執行程式(僅對 windows 有效)

-o dir,--out=dir

指定 spec 檔案的生成目錄。如果沒有指定,則預設使用當前目錄來生成 spec 檔案

-p dir,--path=dir

設定 python 匯入模組的路徑(和設定 pythonpath 環境變數的作用相似)。也可使用路徑分隔符(windows 使用分號,linux 使用冒號)來分隔多個路徑

-n name,--name=name

指定專案(產生的 spec)名字。如果省略該選項,那麼第乙個指令碼的主檔名將作為 spec 的名字

用Pyinstaller打包發布exe應用

pyinstaller 先去官網看支援的python版本 安裝方法1 1.cmd到 python scripts 找到pyinstaller.exe 2.輸入命令 1 pyinstaller.exe f path demo.py 後記 1.程式設定自定義圖示 pyinstaller f i ico ...

Pyinstaller 打包發布經驗總結

注 在 linux系統下使用pyinstaller生成的是linux的可執行檔案,在windows下生成的是exe檔案 pyinstaller基本使用方法 python專案的打包方法 1.spec檔案生成 2.spec檔案配置 3.使用spec執行打包命令 python模組的打包問題 凍結打包路徑 ...

Pyinstaller使用教程

安裝 linux or mac pip install pyinstaller or easy install pyinstaller 版本更新 pip install upgrade pyinstaller or easy install upgrade pyinstaller windows w...