使用 pyinstaller打包多个python文件的 应用程序 并在执行时报出Failed to execute script pyi_rth_pkgres错误
当时使用pyinstaller对python应用程序进行打包的,执行成功打包的exe应用程序时弹出一个错误提示框。信息如下:Failed to execute script pyi_rth_pkgres或者是其他的模块无法加载。此时可以使用打包时导入模块的方式--hidden-import=pkg_resources.py2_warn下面有个打包多个文件的示例pyinstaller.exe -F
·
当时使用pyinstaller对python应用程序进行打包的,执行成功打包的exe应用程序时弹出一个错误提示框。信息如下:
Failed to execute script pyi_rth_pkgres
或者是其他的模块无法加载。此时可以使用打包时导入模块的方式
--hidden-import=pkg_resources.py2_warn
下面有个打包多个文件的示例
pyinstaller.exe -F -w .\photo_editor.py(主文件) -p .\color_filter.py -p .\img_helper.py --hidden-import PIL --hidden-import=pkg_resources.py2_warn
更多推荐




所有评论(0)