title: Trying to install packages with Python 3.7.2 pip causes TSL/SSL errors
body: <p>I'm running on:</p>
  
  <pre><code>Amazon Linux AMI 2018.03.0
  
  Linux ip-xxx-yy-z-ww 4.14.77-70.59.amzn1.x86_64 #1 SMP Mon Nov 12 22:02:45 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  </code></pre>
  
  <p>Multi-python environment. It has both Python 2.7.15 and 3.7.2 installed.</p>
  
  <p>Regular (Python2) pip works without a hitch.</p>
  
  <p>When I try to run <code>pip3 install flask</code> I get the following errors:</p>
  
  <pre><code>pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
  Collecting flask
    Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/flask/
    Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/flask/
    Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/flask/
    Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/flask/
    Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/flask/
    Could not fetch URL https://pypi.org/simple/flask/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/flask/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
    Could not find a version that satisfies the requirement flask (from versions: )
  No matching distribution found for flask
  pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
  Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
  </code></pre>
  
  <p>The same error appears if I try to install any other package.</p>
  
  <p>pip3 version is 18.1</p>
  
  <p>Adding <code>--trusted-host pypi.org</code> does not help.</p>
  
  <p>Installing ca-certificates did not help</p>
  
  <p>Python 3 installed according to the following guide: <a href="https://stackoverflow.com/a/8112006/8826349">https://stackoverflow.com/a/8112006/8826349</a></p>
  
  <p>EDIT: 
  I now noticed, that when running <code>make</code> on Python 3, it finished successfully, but had the following message:</p>
  
  <pre><code>Python build finished successfully!
  The necessary bits to build these optional modules were not found:
  _hashlib              _ssl                  _tkinter
  _uuid
  To find the necessary bits, look in setup.py in detect_modules() for the module's name.
  
  
  The following modules found by detect_modules() in setup.py, have been
  built by the Makefile instead, as configured by the Setup files:
  _abc                  atexit                pwd
  time
  
  
  Could not build the ssl module!
  Python requires an OpenSSL 1.0.2 or 1.1 compatible libssl with X509_VERIFY_PARAM_set1_host().
  LibreSSL 2.6.4 and earlier do not provide the necessary APIs, https://github.com/libressl-portable/portable/issues/381
  </code></pre>
  
  <p>EDIT2:</p>
  
  <p>My issue seems to be identical to <a href="https://bugs.python.org/issue34028" rel="noreferrer">this</a>. However the thread does not provide any solutions beyond describing the problem. </p>
  
  <p>I've tried to compile a newer version of openssl using <a href="https://blacksaildivision.com/how-to-install-openssl-on-centos" rel="noreferrer">this</a> guide. But newer openssl version did not resolve my issue.</p>
  
  <p>EDIT3:</p>
  
  <p>I was unable to find a solution for this issue. </p>
  
  <p>It seems that Amazon's Linux version does not work well with Python 3.</p>
  
  <p>They do have a different OS, called Amazon Linux 2, where installiing Python 3 is as easy as running <code>yum install python3</code></p>
  
  <p>However, Amazon Linux 2 has it's own issues. It's Python 2 installation lacks <code>pip</code>. You can install it manually by running:</p>
  
  <pre><code>curl -O https://bootstrap.pypa.io/get-pip.py
  python get-pip.py --user
  </code></pre>
  
  <p>But this actually overrides pip3, so then Python 3 remains without a <code>pip</code>.</p>