Centos7 scrapy Create a project error TLSVersion.TLSv1_1:SSL. Op_no_tlsv1_1,

Source: Internet
Author: User

Centos7

python2.7

After the PIP is installed

To execute a command to create a project:

Scrapy Startproject Todaymovie

The result is an error, as follows:


[root@lhy-v7-21 scrapycrawler]# scrapy startproject todaymovie traceback (most recent call last): File "/usr/bin/scrapy" , line 7, under <module> from Scrapy.cmdline Import execute File/usr/lib64/python2.7/site-packages/scrapy/cmdli ne.py ", line 9, in <module> scrapy.crawler import crawlerprocess File"/usr/lib64/python2.7/site-packages /scrapy/crawler.py ", line 7, in <module> from twisted.internet import reactor, defer File"/usr/lib64/python2. 7/site-packages/twisted/internet/reactor.py ", line, in <module> from twisted.internet import default File" /usr/lib64/python2.7/site-packages/twisted/internet/default.py ", line, in <module> install = _getinstallfunc tion (platform) File "/usr/lib64/python2.7/site-packages/twisted/internet/default.py", line, in _ Getinstallfunction from twisted.internet.epollreactor Import install File "/usr/lib64/python2.7/site-packages/twiste d/internet/epollreactor.py ", line, in <mOdule> from twisted.internet import posixbase File "/usr/lib64/python2.7/site-packages/twisted/internet/posixbase . py ", line, in <module> from twisted.internet import error, UDP, TCP File"/usr/lib64/python2.7/site-packag es/twisted/internet/tcp.py ", line, in <module> twisted.internet._newtls import (File"/usr/lib64/pyth on2.7/site-packages/twisted/internet/_newtls.py ", line, in <module> twisted.protocols.tls import Tlsmemo Rybiofactory, Tlsmemorybioprotocol File "/usr/lib64/python2.7/site-packages/twisted/protocols/tls.py", line <module> from twisted.internet._sslverify import _setacceptableprotocols File "/usr/lib64/python2.7/site-packa ges/twisted/internet/_sslverify.py ", line, in <module> TLSVersion.TLSv1_1:SSL.
 Op_no_tlsv1_1, Attributeerror: ' Module ' object has NO attribute ' op_no_tlsv1_1 '

After the search problem, there are various solutions available online. For example, my recent photo on the internet said that the installation is as follows:

Yum Install Python-devel
Pip Install Pyopenssl–upgrade

It's no use, and the back Upgrade update system and PIP are useless.

This version is installed on the back,

Twisted, said on the net cannot install too high version, may first see scrapy needs what kind of version and then installs what kind of version. Such as:
[root@lhy-v7-21 scrapycrawler]# pip install scrapy requirement already satisfied:scrapy in/usr/lib64/python2.7/ Site-packages requirement already Satisfied:pyopenssl in/usr/lib64/python2.7/site-packages (from Scrapy) Requirement Already satisfied:parsel>=1.1 in/usr/lib/python2.7/site-packages (from scrapy) requirement already satisfied:six& gt;=1.5.2 in/usr/lib/python2.7/site-packages (from scrapy) requirement already satisfied:queuelib in/usr/lib/ Python2.7/site-packages (from Scrapy) requirement already satisfied:twisted>=13.1.0 in/usr/lib64/python2.7/ Site-packages (from Scrapy) requirement already satisfied:pydispatcher>=2.0.5 in/usr/lib/python2.7/site-packages ( From Scrapy) requirement already satisfied:lxml in/usr/lib64/python2.7/site-packages (from Scrapy) Requirement already s atisfied:w3lib>=1.17.0 in/usr/lib/python2.7/site-packages (from scrapy) requirement already satisfied:cssselect >=0.9 in/usr/lib/python2.7/site-packages (from Scrapy) requiremENT already satisfied:service-identity in/usr/lib/python2.7/site-packages (from Scrapy) requirement already: zope.interface>=3.6.0 in/usr/lib64/python2.7/site-packages (from Twisted>=13.1.0->scrapy) Requirement Already Satisfied:attrs in/usr/lib/python2.7/site-packages (from service-identity->scrapy) Requirement already Satisfied:pyasn1-modules in/usr/lib/python2.7/site-packages (from service-identity->scrapy) Requirement already SATISFIED:PYASN1 in/usr/lib/python2.7/site-packages (from service-identity->scrapy) Requirement already satisfied
 : Setuptools in/usr/lib/python2.7/site-packages (from Zope.interface>=3.6.0->twisted>=13.1.0->scrapy)
Follow the command:
sudo pip install twisted==13.1.0
It worked.
If the above installation is not successful, you can try the following methods to download the compilation:
wget https://twistedmatrix.com/Releases/Twisted/17.1/Twisted-17.1.0.tar.bz2
TAR-JXVF twisted-17.1.0.tar.bz2
CD Twisted-17.1.0
Python setup.py Install
Reference: Https://stackoverflow.com/questions/42731760/attributeerror-module-object-has-no-attribute-op-no-tlsv1-1
https://segmentfault.com/a/1190000009110685
http://bbs.csdn.net/topics/392135227
Https://stackoverflow.com/questions/42573038/scrapy-module-object-has-no-attribute-op-single-ecdh-use

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.