Ich habe Probleme bekommen tls v1.2 Unterstützung für meine Python-Installation auf meinem Mac.AttributeError: 'Modul' Objekt hat kein Attribut 'PROTOCOL_TLSv1_2' mit Python 2.7.11
Dies ist meine openssl Version:
openssl version
OpenSSL 1.0.2h 3 May 2016
Und hier ist meine Python-Version:
python --version
Python 2.7.11
Dies ist, wie ich die Prüfung am:
>>> import ssl
>>> ssl.PROTOCOL_TLSv1_2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'PROTOCOL_TLSv1_2'
das Lesen: https://docs.python.org/2/library/ssl.html Es sagt:
Some behavior may be platform dependent, since calls are made to the operating system socket APIs. The installed version of OpenSSL may also cause variations in behavior. For example, TLSv1.1 and TLSv1.2 come with openssl version 1.0.1.
So habe ich die Anforderungen für die Unterstützung von tlsv1.2 mit meiner Installation von OpenSSL 1.0.2h.
Wer hat irgendwelche Ideen?
Bitte überprüfen Sie, dass Sie nicht nur die neue Version von openssl installiert haben, sondern dass Sie sie tatsächlich in Python verwenden, d. H. 'Import ssl \ nprint ssl.OPENSSL_VERSION' –
Ja, das war das Problem. Ich habe es mit 'brew install python --with-breed-openssl' neu installiert. – gprime
gprime, kannst du das als Antwort schreiben? –