最近用pyinstaller打包的时候一直报“failed to execute script main”。
最终使用“pyinstaller --hidden-import=pkg_resources -F main.py</strong>” 顺利打包。
注意:语句中的“-F”一定要大写
在anocoda环境下python打包成exe
最新推荐文章于 2026-05-28 14:31:49 发布
本文介绍了一种使用PyInstaller工具打包Python程序时遇到的问题及解决方案。作者遇到了“failedtoexecutescriptmain”的错误,并通过添加特定参数成功解决了该问题。
2297

被折叠的 条评论
为什么被折叠?



