python爬虫Scrapy使用scrapy startproject xxx抛出异常
黄舟
黄舟 2017-04-17 13:35:19
0
1
331

使用scrapy startproject tutorial时,执行错误:

scrapy startproject tutorial Traceback (most recent call last): File "/usr/local/bin/scrapy", line 5, in  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  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: queue lib

/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py中查看它的代码, 在565行左右:

while requirements: req = requirements.pop(0) # process dependencies breadth-first if req in processed: # Ignore cyclic or redundant dependencies continue dist = best.get(req.key) if dist is None: # Find the best distribution and add it to the map dist = self.by_key.get(req.key) if dist is None: if env is None: env = Environment(self.entries) dist = best[req.key] = env.best_match(req, self, installer) if dist is None: raise DistributionNotFound(req) # XXX put more info here to_activate.append(dist) if dist not in req: # Oops, the "best" so far conflicts with a dependency raise VersionConflict(dist,req) # XXX put more info here requirements.extend(dist.requires(req.extras)[::-1]) processed[req] = True

不太清楚具体环境哪里错误了,还请各位大神或者有过类似经验的

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

全部回复 (1)
Ty80

建议是用virtualenv环境,正常的环境安装Scrapy有时候会出现未知异常。

    最新下载
    更多>
    网站特效
    网站源码
    网站素材
    前端模板
    关于我们 免责声明 Sitemap
    PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!