首页 > 代码库 > mac下使用scrapy时出现的raise DistributionNotFound(req)异常的处理方法
mac下使用scrapy时出现的raise DistributionNotFound(req)异常的处理方法
在os x下,安装完python爬虫框架scrapy后,使用scrapy startproject tutorial新建scrapy项目时,出现以下问题:
Traceback (most recent call last): File "/usr/local/bin/scrapy", line 5, in <module> from pkg_resources import load_entry_point File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in <module> working_set.require(__requires__) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require needed = self.resolve(parse_requirements(requirements)) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve raise DistributionNotFound(req) # XXX put more info herepkg_resources.DistributionNotFound: queuelib
网上查了很久,终于找到解决方法(来自一位国际友人):
This is a problem in pkg_resources, and can be fixed by: sudo pip install --upgrade setuptools.It works fine with setuptools-5.3.
mac下使用scrapy时出现的raise DistributionNotFound(req)异常的处理方法
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。