我已經使用Scrapy網站提供的Ubuntu軟件包安裝了Scrapy。 但在啓動一個Scrapy項目時開始新的scrapy項目時出錯
scrapy startproject test
我得到的錯誤信息爲。
Traceback (most recent call last): File "/usr/bin/scrapy", line 5,
in <module>
from pkg_resources import load_entry_point File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 3084,
in <module>
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 3070, in _call_aside
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 3097, in _initialize_master_working_set
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 653, in _build_master
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 666, in _build_from_requirements
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 844, in resolve
pkg_resources.ContextualVersionConflict: (pyasn1 0.1.7 (/usr/lib/python2.7/dist-packages),
Requirement.parse('pyasn1>=0.1.8'), set(['pyasn1-modules']))
請幫我解決這個錯誤。我正在運行Python 2.7.6
看起來你缺少一個依賴關係。嘗試安裝pyasn1 –
只需在終端中鍵入scrapy並讓我知道結果 –
'pip install pyasn1' - 如果您收到錯誤消息,可能帶有'sudo'。 –