码迷,mamicode.com
首页 > 其他好文 > 详细

mac下使用scrapy时出现的raise DistributionNotFound(req)异常的处理方法

时间:2014-10-06 12:32:50      阅读:412      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   io   os   使用   ar   sp   div   

在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 here
pkg_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)异常的处理方法

标签:style   blog   color   io   os   使用   ar   sp   div   

原文地址:http://www.cnblogs.com/rambot/p/4007970.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!