pyinstaller无法执行脚本pyi rth pkgres [英] pyinstaller failed to execute script pyi rth pkgres
问题描述
我有一个用pyinstaller制作的exe文件,当我尝试运行它时,它给了我这个错误:
I have an exe file that I made with pyinstaller and when I try to run it it gives me this error:
ModuleNotFoundError:没有名为'pkg_resources.py2_warn'的模块[50728]
ModuleNotFoundError: No module named 'pkg_resources.py2_warn' [50728]
无法执行脚本pyi_rth_pkgres
Failed to execute script pyi_rth_pkgres
python脚本包含一个使用apscheduler.schedulers.blocking中的BlockingScheduler的调度程序,当我将其作为python脚本执行时,该调度程序有效,但以exe文件形式返回此错误.
the python script contains a scheduler using BlockingScheduler from apscheduler.schedulers.blocking that works when I execute it as a python script, but return this error as an exe file.
推荐答案
在stackoverflow上看到了这个答案(不记得该URL):这是您需要做的:
Saw this answer on stackoverflow (can't remember the url): Here's what you need to do:
步骤:1 pip卸载pyinstaller
步骤:2 pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip
好运
这篇关于pyinstaller无法执行脚本pyi rth pkgres的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!