簡體   English   中英

PyInstaller 不包含為您的平台預編譯的引導加載程序

[英]PyInstaller does not include a pre-compiled bootloader for your platform

我正在嘗試使用 pyinstaller 將我的 python 程序轉換為 exe

我的文件名是main.py

我想要沒有控制台,所以我使用了-w標志,但它不起作用。

我正在使用命令pyinstaller --onefile -w main.py

它給了我 3 個文件夾和一個.spec文件,如附圖所示。

其中dist文件夾如果為空,則build包含一個文件夾,並且__pycache__中有main.cpython-39 [當我運行時,它會提供一個控制台(不需要)以及 gui]。

我在 windows 10 64 位操作系統上,使用 python 3.9.0 和 pyinstaller 4.3

知道我在做什么錯嗎?

謝謝你

它給出以下錯誤:

 PyInstaller does not include a pre-compiled bootloader for your platform.

代碼鏈接在這里: https://github.com/EzyGrip/Calculator/blob/main/main.py

編輯:我剛剛發現只有當我嘗試隱藏控制台時才會發生此錯誤。

你可以試試

pyinstaller --noconfirm --onefile --windowed -hidden-import tkinter --noconsole  "Insert your file path here ex - C:/foldername/main.py"

該問題可能與您的防病毒軟件有關。 Pyinstaller 直接寫入 EXE 文件這一事實被視為病毒攻擊,並被某些系統阻止。 我無法追蹤單個文件版本被阻止的原因,但“文件夾”安裝版本......以及世界上所有其他編譯器和安裝構建器......不是。

這里有一個關於這個問題的討論: Program made with PyInstaller now seen as a Trojan Horse by AVG

嘗試這個

pyinstaller --noconfirm --onedir --console "文件夾路徑/文件名.py"

如果問題仍然存在,使用您的代碼鏈接我能夠創建 exe 嘗試更新 pyinstaller

還要確保 python 版本是 3.6-3.9

暫無
暫無

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

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