4 回答

TA貢獻(xiàn)1798條經(jīng)驗(yàn) 獲得超7個(gè)贊
我遇到了同樣的問(wèn)題,我可以通過(guò)轉(zhuǎn)到 Windows 防病毒保護(hù)選項(xiàng)并添加我的腳本所在的文件夾作為例外來(lái)修復(fù)它。
轉(zhuǎn)到“開(kāi)始”>“設(shè)置”>“更新和安全”>“Windows 安全”,然后選擇“病毒和威脅防護(hù)”。在“病毒和威脅防護(hù)設(shè)置”下,選擇“管理設(shè)置”。添加包含所需腳本的文件夾作為例外。

TA貢獻(xiàn)1796條經(jīng)驗(yàn) 獲得超4個(gè)贊
我花了幾個(gè)小時(shí)尋找解決方案,幾乎嘗試了互聯(lián)網(wǎng)上的所有可能的解決方案,此外,我終于通過(guò)安裝較低版本(pyinstaller v5.6.2)而不是最新版本解決了問(wèn)題,這解決了它我!

TA貢獻(xiàn)1828條經(jīng)驗(yàn) 獲得超4個(gè)贊
我今天遇到了同樣的問(wèn)題。我在 Windows 10 上安裝 Anaconda。我最終嘗試以管理員身份運(yùn)行 anaconda 提示符并重新運(yùn)行相同的 pyinstaller 命令。以管理員身份運(yùn)行解決了我的問(wèn)題。

TA貢獻(xiàn)1824條經(jīng)驗(yàn) 獲得超5個(gè)贊
Without the knowing of the script you are changing to exe, it is difficult to guess. The attached slice from the command line in your question about the error also says nothing, as @Eric Sunrightly pointed out. So it remains to give the reason for the error in other cases seemingly not necessarily related to your question, hoping that through the associations it will be possible to remove the cause of the error in yours and maybe in other cases. Eventually, I found this question looking for an answer to the same error. For me, the reason for the error was to provide the optional argument –icon=app.ico. It turned out that a file with the extension .ico was not an icon at all, but a different format, changed by the changing only the extension. When I changed a file saved in the format . png to .ico in the correct way pyinstaller stopped reporting an error.
添加回答
舉報(bào)