簡體   English   中英

我試圖將 python 文件轉換為 exe 文件,但它不起作用

[英]Im trying to turn a python file into an exe file and its not working

我嘗試使用pyinstaller main.py --onefile --noconsole將我的 python 文件制作成一個 exe。當我嘗試從 dist 打開 exe 時出現錯誤,所以我使用了--debug=all並且它說pyinstaller: error: the following arguments are required: scriptname

我到底在做什么,因為這是我的第一次,我不太確定。

要將 python 文件轉換為 exe:

  1. 確保你已經安裝了 pyinstaller 並且是最新的

    pip install pyinstaller

  2. 在 PowerShell 中鍵入以下內容:

    pyinstaller --onefile -w 'youfilename.py'

文件名應該是1.exe確保在正確的目錄中

如果您有更多疑問,請使用此鏈接: https : //www.geeksforgeeks.org/convert-python-script-to-exe-file/

暫無
暫無

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

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