python實現打包exe可執行檔案

2021-10-09 11:01:25 字數 849 閱讀 5915

pip install pyinstaller
altgraph-0.17-py2.py3-none-any.whlfuture-0.18.2-py3-none-any.whl

pefile-2019.4.18-py2.py3-none-any.whl

pywin32_ctypes-0.2.0-py3-none-any.whl

pyinstaller-3.6-py2.py3-none-any.whl

切換到.whl檔案所在目錄,執行以下安裝命令(若安裝失敗,以管理員許可權執行cmd試試)

pip install altgraph-0.17-py2.py3-none-any.whl

pip install future-0.18.2-py3-none-any.whl

pip install pefile-2019.4.18-py2.py3-none-any.whl

pip install pywin32_ctypes-0.2.0-py3-none-any.whl

pip install pyinstaller-3.6-py2.py3-none-any.whl

切換到.py檔案所在的目錄下,執行以下打包命令

pyinstaller -f ***.py #生成乙個可執行檔案,在同級目錄的dist檔案中

打包好的可執行檔案,到處可以執行,即使沒有python環境,很方便

python指令碼打包exe可執行檔案

軟體環境 python32位 python 2.7.14.msi pyintsller2.0 pywin32 219.win32 py2.7 上面軟體可在win10 x64系統下安裝,經過打包出來的exe可在xp 32位系統下執行 pyintsller2.0 不需要安裝,直接解壓到自定義目錄就行 可...

python打包成exe可執行檔案

把做好的py檔案打包成exe 我們要用到pyinsatller這個包 安裝pyinsatller pip3 install pyinstaller例如我們的py 為 輸入兩個數,求兩個數之和。x input 請輸入第乙個數 y input 請輸入第二個數 z float x float y prin...

python 打包成exe 可執行檔案

1,安裝pyinsatller pip3 install pyinstaller 2,使用pyinstaller打包python程式 pyinstaller f w i icofile filename filename表示你的python程式檔名 w 表示隱藏程式執行時的命令列視窗 不加 w會有黑...