簡體   English   中英

從 .py 創建 exe 文件

[英]Create exe files from .py

我有一個 python 程序,它有 3 個模塊 .py。

我應該怎么做才能創建這個程序的 exe 格式?

我用 pyinstaller 試試這個,但那是為我的主 .py 和其他 .py 創建 exe

模塊不包含在其中!

安裝 pyinstaller:轉到命令提示符並鍵入pip install pyinstaller

創建 .exe:如果要從 .py 創建 .exe,則需要在文件的正確目錄下打開命令提示符並鍵入:

pyinstaller —-onefile filename  // e.g hello.py as the filename

如果它有任何基本圖形,請在命令提示符下鍵入以下內容

pyinstaller —-onefile -w then your file name

這應該都有效。

如果沒有,我建議您觀看此視頻

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM