AttributeError: 'module' object has no attribute 'PROTOCOL_TLSv1_2' with Python 2.7.11
<p>I am having issues getting tls v1.2 support for my python installation on my mac.</p>

<p>This is my openssl version:</p>

<pre><code>openssl version
OpenSSL 1.0.2h  3 May 2016
</code></pre>

<p>And here is my python version:</p>

<pre><code>python --version
Python 2.7.11
</code></pre>

<p>This is how I am testing:</p>

<pre><code>&gt;&gt;&gt; import ssl
&gt;&gt;&gt; ssl.PROTOCOL_TLSv1_2
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
AttributeError: 'module' object has no attribute 'PROTOCOL_TLSv1_2'
</code></pre>

<p>Reading this: <a href="https://docs.python.org/2/library/ssl.html" rel="noreferrer">https://docs.python.org/2/library/ssl.html</a>
It says:</p>

<blockquote>
  <p>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.</p>
</blockquote>

<p>So I have the requirements for tlsv1.2 support with my installation of OpenSSL 1.0.2h.</p>

<p>Anyone have any ideas?</p>