且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

对 pkg_resources.DistributionNotFound 错误进行故障排除

更新时间:2023-11-17 21:33:58

我刚刚遇到了同样的问题.问题是代码可以在一台计算机上运行,​​但不能在另一台计算机上运行.我也在使用我制造的***.无论如何,我找到的解决方案是升级 pip 和我的包.例如

I just had this same issue. The trouble is the code works on one computer but not on another. Also I am using a wheel that I built. Anyway, the solution I found was to upgrade pip and my package. eg

pip install --upgrade pip path/to/my_package

重新安装了 pip 和我的包,然后入口点就可以工作了.

That re-installed both pip and my package, then the entry points were working.