码迷,mamicode.com
首页 > 编程语言 > 详细

【python】scrapy相关

时间:2016-04-14 15:37:44      阅读:240      评论:0      收藏:0      [点我收藏+]

标签:

python2.7与python3.5共存时安装scrapy后,执行scrapy后报错

Traceback (most recent call last):
       File "/Library/Frameworks/Python.framework/Versions/3.5/bin/scrapy", line 9, in <module>
          load_entry_point(Scrapy==1.0.1, console_scripts, scrapy)()
       File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/scrapy/cmdline.py", line 122, in execute
          cmds = _get_commands_dict(settings, inproject)
       File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/scrapy/cmdline.py", line 46, in _get_commands_dict
          cmds = _get_commands_from_module(scrapy.commands, inproject)
       File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/scrapy/cmdline.py", line 29, in _get_commands_from_module
          for cmd in _iter_command_classes(module):
       File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-     packages/scrapy/cmdline.py", line 21, in _iter_command_classes
    for obj in vars(module).itervalues():
    AttributeError: dict object has no attribute itervalues

解决方法

sudo pip install scrapy==1.1.0rc1

执行完后Scrapy对于Python3就可用了

 

【python】scrapy相关

标签:

原文地址:http://www.cnblogs.com/liubei/p/scrapy.html

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