2017-08-15 39 views
0

我按照安裝指南https://docs.scrapy.org/en/latest/intro/install.html 但我安裝失敗。當我點安裝scrapy時,最後安裝失敗。在Ubuntu上安裝Scrapy14.04

enter image description here

------在11:47 --- 我無法正常運行scrapy編輯。

enter image description here

---當我運行它----

Traceback (most recent call last): 
    File "/usr/local/bin/scrapy", line 7, in <module> 
    from scrapy.cmdline import execute 
    File "/usr/local/lib/python2.7/dist-packages/scrapy/cmdline.py", line 9, 
in <module> 
    from scrapy.crawler import CrawlerProcess 
    File "/usr/local/lib/python2.7/dist-packages/scrapy/crawler.py", line 7, 
in <module> 
    from twisted.internet import reactor, defer 
    File "/usr/local/lib/python2.7/dist-packages/twisted/internet/reactor.py", 
line 38, in <module> 
    from twisted.internet import default 
    File "/usr/local/lib/python2.7/dist-packages/twisted/internet/default.py", 
line 56, in <module> 
    install = _getInstallFunction(platform) 
    File "/usr/local/lib/python2.7/dist-packages/twisted/internet/default.py", 
line 44, in _getInstallFunction 
    from twisted.internet.epollreactor import install 
    File "/usr/local/lib/python2.7/dist- 
packages/twisted/internet/epollreactor.py", line 24, in <module> 
    from twisted.internet import posixbase 
    File "/usr/local/lib/python2.7/dist- 
packages/twisted/internet/posixbase.py", line 18, in <module> 
    from twisted.internet import error, udp, tcp 
    File "/usr/local/lib/python2.7/dist-packages/twisted/internet/tcp.py", 
line 28, in <module> 
    from twisted.internet._newtls import (
    File "/usr/local/lib/python2.7/dist-packages/twisted/internet/_newtls.py", 
line 21, in <module> 
    from twisted.protocols.tls import TLSMemoryBIOFactory, 
TLSMemoryBIOProtocol 
    File "/usr/local/lib/python2.7/dist-packages/twisted/protocols/tls.py", 
line 63, in <module> 
    from twisted.internet._sslverify import _setAcceptableProtocols 
    File "/usr/local/lib/python2.7/dist- 
packages/twisted/internet/_sslverify.py", line 38, in <module> 
    TLSVersion.TLSv1_1: SSL.OP_NO_TLSv1_1, 
AttributeError: 'module' object has no attribute 'OP_NO_TLSv1_1' 
+2

您的用戶帳戶不具有的權限,切換到root帳戶。 –

+0

謝謝,但是當我用root帳號安裝這個東西的時候,好像沒有正確安裝。 – DennisShaw

+0

當你說我無法正確運行scrapy時,發生了什麼?運行scrapy時會出現什麼錯誤? –

回答

0

相反的pip install Scrapy,做sudo pip install Scrapy

另外,使用virtualenv

+0

謝謝,但是當我用root帳號安裝這個東西的時候,好像沒有正確安裝。 – DennisShaw

+0

@DennisShaw按照[這裏]描述的步驟(https://github.com/scrapy/scrapy/issues/2473),那麼它應該工作。 –

0

似乎是一個PyOpenSSL問題。

嘗試:

sudo pip install -U pyOpenSSL