标签:
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就可用了
标签:
原文地址:http://www.cnblogs.com/liubei/p/scrapy.html