Python Scrapy无法启动教程OSX 10.11.3

时间:2016-03-09 16:24:17

标签: python macos scrapy

我通过brew安装了python3,我安装了virtualenv和virtualenvwrapper,并设置了虚拟环境。我使用pip3.5 install scrapy激活了一个虚拟环境并安装了scrapy(稍后我也使用了pippip3 - 我认为我已经开始使用3个不同的版本,但它就是它的本质)

我的〜/ .bash_profile有:

VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3.5 export VIRTUALENVWRAPPER_PYTHON

PYTHONPATH="/usr/local/bin/python3.5:$PYTHONPATH" export PYTHONPATH

export WORKON_HOME=~/.virtualenvs source /usr/local/bin/virtualenvwrapper.sh

然而,当我运行scrapy startproject tutorial时,我得到了一堆错误,顺便说一句。如果我在激活虚拟环境时运行命令没有区别。我甚至试图在命令中手动设置scrapy的路径 - 仍然没有运气。

Traceback (most recent call last):
File "/Users/b101/.virtualenvs/venv/bin/scrapy", line 11, in <module>
sys.exit(execute())
File "/Users/b101/.virtualenvs/venv/lib/python3.5/site-packages/scrapy/cmdline.py", line 122, in execute
cmds = _get_commands_dict(settings, inproject)
File "/Users/b101/.virtualenvs/venv/lib/python3.5/site-packages/scrapy/cmdline.py", line 46, in _get_commands_dict
cmds = _get_commands_from_module('scrapy.commands', inproject)
File "/Users/b101/.virtualenvs/venv/lib/python3.5/site-packages/scrapy/cmdline.py", line 29, in _get_commands_from_module
for cmd in _iter_command_classes(module):
File "/Users/b101/.virtualenvs/venv/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'

有人知道如何解决这个问题或让它发挥作用吗?

由于

0 个答案:

没有答案