我使用Mac OS,它有python 2.7和python 3.4.我使用pip install命令scrapy在python 2.7中安装.买我也用pip3 install命令scrapy在python3.4中安装......
我在scrapy.org上阅读了官方文档,我知道scrapy只支持python 2.7.当我使用该命令时scrapy startproject tutorial,它将返回下面的errow.
如何在scrapy startproject tutorialpython 2.7中使用该命令?
File "/Library/Frameworks/Python.framework/Versions/3.4/bin/scrapy", line 9, in <module>
load_entry_point('Scrapy==1.1.0dev1', 'console_scripts', 'scrapy')()
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Scrapy-1.1.0dev1-py3.4.egg/scrapy/cmdline.py", line 122, in execute
cmds = _get_commands_dict(settings, inproject)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Scrapy-1.1.0dev1-py3.4.egg/scrapy/cmdline.py", line 46, in _get_commands_dict
cmds = _get_commands_from_module('scrapy.commands', inproject)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Scrapy-1.1.0dev1-py3.4.egg/scrapy/cmdline.py", line 29, in _get_commands_from_module
for cmd in _iter_command_classes(module):
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Scrapy-1.1.0dev1-py3.4.egg/scrapy/cmdline.py", line 21, in _iter_command_classes
for obj in vars(module).itervalues():
AttributeError: 'dict' object has …Run Code Online (Sandbox Code Playgroud)