2017-10-17 39 views
0

我是Python新手,一般编码。我正试图通过Scrapy构建一个刮板。我正试图在Mac OS 10.12.6上做到这一点。我尽可能按照说明操作(https://doc.scrapy.org/en/latest/intro/tutorial.html),但是当我拨打 scrapy start项目教程我在下面得到以下输出。解决这个问题并理解未来错误消息的最好方法是什么?scrapy startproject教程错误Mac OS

谢谢!

File "/usr/local/bin/scrapy", line 9, in <module> 
    load_entry_point('Scrapy==1.4.0', 'console_scripts', 'scrapy')() 
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 565, in load_entry_point 
    return get_distribution(dist).load_entry_point(group, name) 
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2697, in load_entry_point 
    return ep.load() 
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2370, in load 
    return self.resolve() 
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2376, in resolve 
    module = __import__(self.module_name, fromlist=['__name__'], level=0) 
    File "/Library/Python/2.7/site-packages/Scrapy-1.4.0-py2.7.egg/scrapy/cmdline.py", line 9, in <module> 
    from scrapy.crawler import CrawlerProcess 
    File "/Library/Python/2.7/site-packages/Scrapy-1.4.0-py2.7.egg/scrapy/crawler.py", line 7, in <module> 
    from twisted.internet import reactor, defer 
    File "/Library/Python/2.7/site-packages/Twisted-17.9.0-py2.7-macosx-10.12-intel.egg/twisted/internet/reactor.py", line 38, in <module> 
    from twisted.internet import default 
    File "/Library/Python/2.7/site-packages/Twisted-17.9.0-py2.7-macosx-10.12-intel.egg/twisted/internet/default.py", line 56, in <module> 
    install = _getInstallFunction(platform) 
    File "/Library/Python/2.7/site-packages/Twisted-17.9.0-py2.7-macosx-10.12-intel.egg/twisted/internet/default.py", line 50, in _getInstallFunction 
    from twisted.internet.selectreactor import install 
    File "/Library/Python/2.7/site-packages/Twisted-17.9.0-py2.7-macosx-10.12-intel.egg/twisted/internet/selectreactor.py", line 18, in <module> 
    from twisted.internet import posixbase 
    File "/Library/Python/2.7/site-packages/Twisted-17.9.0-py2.7-macosx-10.12-intel.egg/twisted/internet/posixbase.py", line 18, in <module> 
    from twisted.internet import error, udp, tcp 
    File "/Library/Python/2.7/site-packages/Twisted-17.9.0-py2.7-macosx-10.12-intel.egg/twisted/internet/tcp.py", line 28, in <module> 
    from twisted.internet._newtls import (
    File "/Library/Python/2.7/site-packages/Twisted-17.9.0-py2.7-macosx-10.12-intel.egg/twisted/internet/_newtls.py", line 21, in <module> 
    from twisted.protocols.tls import TLSMemoryBIOFactory, TLSMemoryBIOProtocol 
    File "/Library/Python/2.7/site-packages/Twisted-17.9.0-py2.7-macosx-10.12-intel.egg/twisted/protocols/tls.py", line 63, in <module> 
    from twisted.internet._sslverify import _setAcceptableProtocols 
    File "/Library/Python/2.7/site-packages/Twisted-17.9.0-py2.7-macosx-10.12-intel.egg/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' 
+0

请在[编辑]中显示您的代码。 – LW001

回答

0

我通过更新pyOpenSSL 0.14修复了这个问题。

不久后,虽然我有更多的本地和用户版本的python问题,但通过下载Anaconda进行排序。