Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 属性错误:';模块';对象没有属性';操作编号TLSv1和x27;虚拟的_Python_Macos_Scrapy - Fatal编程技术网

Python 属性错误:';模块';对象没有属性';操作编号TLSv1和x27;虚拟的

Python 属性错误:';模块';对象没有属性';操作编号TLSv1和x27;虚拟的,python,macos,scrapy,Python,Macos,Scrapy,我试图在OSX上的虚拟环境中安装scrapy,但遇到以下问题: 回溯(最近一次调用):文件“/usr/local/bin/scrapy”, 第7行,在 从scrapy.cmdline导入执行文件“/Library/Python/2.7/site packages/scrapy/cmdline.py”,第9行,在 从scrapy.crawler导入CrawlerProcess文件“/Library/Python/2.7/site packages/scrapy/crawler.py”,第7行,在

我试图在OSX上的虚拟环境中安装scrapy,但遇到以下问题:

回溯(最近一次调用):文件“/usr/local/bin/scrapy”, 第7行,在 从scrapy.cmdline导入执行文件“/Library/Python/2.7/site packages/scrapy/cmdline.py”,第9行,在 从scrapy.crawler导入CrawlerProcess文件“/Library/Python/2.7/site packages/scrapy/crawler.py”,第7行,在 从twisted.internet导入reactor,延迟文件“/Library/Python/2.7/site packages/twisted/internet/reactor.py”,第行 38,在 从twisted.internet导入默认文件“/Library/Python/2.7/site packages/twisted/internet/default.py”,第行 56,在 install=_getInstallFunction(平台)文件“/Library/Python/2.7/site-packages/twisted/internet/default.py”,第行 50,在_getInstallFunction中 从twisted.internet.selectreactor导入安装文件“/Library/Python/2.7/site packages/twisted/internet/selectreactor.py”, 第18行,在 从twisted.internet导入posixbase文件“/Library/Python/2.7/site packages/twisted/internet/posixbase.py”, 第18行,在 来自twisted.internet导入错误,udp,tcp文件“/Library/Python/2.7/site packages/twisted/internet/tcp.py”,第28行, 在里面 来自twisted.internet._newtlsimport(文件“/Library/Python/2.7/site packages/twisted/internet/_newtls.py”,第行 21,在 从twisted.protocols.tls导入TLSMemoryBIOFactory,TLSMemoryBIOProtocol文件 “/Library/Python/2.7/site packages/twisted/protocols/tls.py”,第63行, 在里面 从twisted.internet.\u sslverify导入\u setAcceptableProtocols文件 “/Library/Python/2.7/site packages/twisted/internet/_sslverify.py”, 第38行,在 TLSVersion.TLSv1\u 1:SSL.OP\u NO\u TLSv1\u 1,AttributeError:“模块”对象没有属性“OP\u NO\u TLSv1\u 1”


我试过这些:

  • pip安装Twisted==16.4.1

  • pip安装--升级pyOpenSSl

  • 但仍然获取属性错误:“模块”对象没有属性“OP\u no\u TLSv1\u 1”

    我的python版本是2.7.10

    尝试了这些,所有人都得到了“最新的要求:…”:


    希望能解决……谢谢!

    发布
    $brew list | grep openssl
    你得到了什么?嗨@hoefling,我得到了
    openssl
    发布
    $brew list | grep openssl
    你得到了什么?嗨@hoefling,我得到了
    openssl
    pip install --upgrade scrapy
    pip install --upgrade twisted
    pip install --upgrade pyopenssl