Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ssl 'module' object has no attribute 'SSLContext'

Tags:

In [1]: import ssl  In [2]: context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)  AttributeError  Traceback (most recent call last) <ipython-input-2-13c9bad66150> in <module>() ----> 1 context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)  AttributeError: 'module' object has no attribute 'SSLContext' 

Python version: 2.7.6

like image 876
Chandler.Huang Avatar asked Jan 30 '15 02:01

Chandler.Huang


1 Answers

SSLContext was introduced in 2.7.9, you're using an old version of Python so it doesn't have this attribute.

like image 121
Games Brainiac Avatar answered Sep 21 '22 20:09

Games Brainiac