我安裝了scrapy sudo pip install scrapy
。安裝沒有錯誤,但它不會運行。Scrapy使用python3目錄(Ubuntu)
scrapy --version
返回此:
Traceback (most recent call last):
File "/usr/local/bin/scrapy", line 9, in <module>
load_entry_point('Scrapy==0.24.6', 'console_scripts', 'scrapy')()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 521, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2632, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2312, in load
return self.resolve()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2318, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/local/lib/python3.4/dist-packages/scrapy/__init__.py", line 28, in <module>
import _monkeypatches
ImportError: No module named '_monkeypatches'
這是爲什麼找我的蟒蛇3目錄?
看看你的'scrapy'的位置,然後檢查你的$ PYTHONPATH和$ PATH。可能會給你一個方向。 – boardrider
感謝您的提示。我用它來解決我的問題。請參閱下面的答案。 –