pip install bs4 giving _socketobject error
<p>I am trying to install BeautifulSoup4 using the command <code>pip install BeautifulSoup4</code>, as per the bs documentation here:</p>

<p><a href="https://www.crummy.com/software/BeautifulSoup/#Download">https://www.crummy.com/software/BeautifulSoup/#Download</a></p>

<p>I am using Mac OS X 10.7.5, and python 2.7.12</p>

<p>When I run the command in Terminal I get the error:</p>

<pre><code>AttributeError: '_socketobject' object has no attribute 'set_tlsext_host_name'
</code></pre>

<p>Can anyone suggest what I'm doing wrong?  Thanks in advance.</p>

<p>EDIT:
In light of comments I have tried to run <code>sudo pip install pyopenssl</code> however I get the same 'socketobject' error.</p>

<p>Alternatively, you can install Anaconda Python from: <a href="https://www.continuum.io/downloads" rel="nofollow">https://www.continuum.io/downloads</a></p>

<p>This installation includes BS out of the box as most of the common libraries you will use. Plus it makes library installation quite easy.</p>

python python-2.7 beautifulsoup