title: How to fix "ssl module in Python is not available" in CentOs
body: <p>New Python 3.7.1 installation on GoDaddy VPS CentOs 7.
  Attempt pip3 install virtualenv or python 3 -m pip install virtualenv and get:</p>
  
  <p>pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.</p>
  
  <p>openssl-devel installed and up to date</p>
  
  <p>This question has been asked and answered many times, but the solutions I've found have not solved my problem.
  Thank you all!</p>
  
  <p>I tried the CentOs and Linux-based solutions in the following:</p>
  
  <p><a href="https://stackoverflow.com/questions/41328451/ssl-module-in-python-is-not-available-when-installing-package-with-pip3">&quot;SSL module in Python is not available&quot; when installing package with pip3</a>
        # To allow for building python ssl libs
        yum install openssl-devel
        # Download the source of <em>any</em> python version
        cd /usr/src
        wget <a href="https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tar.xz" rel="noreferrer">https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tar.xz</a>
        tar xf Python-3.7.1.tar.xz 
        cd Python-3.7.1</p>
  
  <pre><code>  # Configure the build w/ your installed libraries
    ./configure
  
    # Install into /usr/local/bin/python3.6, don't overwrite global python bin
    make altinstall
  </code></pre>
  
  <p><a href="https://stackoverflow.com/questions/54310843/trying-to-install-packages-with-python-3-7-2-pip-causes-tsl-ssl-errors">Trying to install packages with Python 3.7.2 pip causes TSL/SSL errors</a></p>
  
  <p><a href="https://stackoverflow.com/questions/41328451/ssl-module-in-python-is-not-available-when-installing-package-with-pip3">&quot;SSL module in Python is not available&quot; when installing package with pip3</a></p>
  
  <p><a href="https://stackoverflow.com/questions/45954528/pip-is-configured-with-locations-that-require-tls-ssl-however-the-ssl-module-in">pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available</a></p>
  
  <p><code>yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel</code></p>
  
  <p><a href="https://stackoverflow.com/questions/44290926/pip-cannot-confirm-ssl-certificate-ssl-module-is-not-available">pip cannot confirm SSL certificate: SSL module is not available</a></p>
  
  <p><a href="https://stackoverflow.com/questions/49094768/ssl-module-in-python-is-not-available">&quot;ssl module in Python is not available&quot;</a>
      and
  <a href="https://stackoverflow.com/questions/44290926/pip-cannot-confirm-ssl-certificate-ssl-module-is-not-available">pip cannot confirm SSL certificate: SSL module is not available</a></p>
  
  <pre><code>  `uncommented suggestions for CentOs
    make install failed:
      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall    -std=c99 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration   -I. -I./Include     -DUSE_SSL -I/include -I/include/openssl -c ./Modules/_ssl.c -o Modules/_ssl.o
      ./Modules/_ssl.c:74:6: error: #error "libssl is too old and does not support X509_VERIFY_PARAM_set1_host()"
      ./Modules/_ssl.c: In function ‘_ssl_configure_hostname’:
      ./Modules/_ssl.c:861: error: implicit declaration of function ‘SSL_get0_param’
      ./Modules/_ssl.c:861: warning: initialization makes pointer from integer without a cast
      ./Modules/_ssl.c:863: error: implicit declaration of function ‘X509_VERIFY_PARAM_set1_host’
      ./Modules/_ssl.c:869: error: implicit declaration of function ‘X509_VERIFY_PARAM_set1_ip’
      ./Modules/_ssl.c: In function ‘_ssl__SSLContext_impl’:
      ./Modules/_ssl.c:2988: error: ‘X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS’ undeclared (first use in this function)
      ./Modules/_ssl.c:2988: error: (Each undeclared identifier is reported only once
      ./Modules/_ssl.c:2988: error: for each function it appears in.)
      ./Modules/_ssl.c:3093: error: implicit declaration of function ‘SSL_CTX_get0_param’
      ./Modules/_ssl.c:3093: warning: assignment makes pointer from integer without a cast
      ./Modules/_ssl.c:3099: error: implicit declaration of function ‘X509_VERIFY_PARAM_set_hostflags’
      ./Modules/_ssl.c: In function ‘get_verify_flags’:
      ./Modules/_ssl.c:3397: warning: assignment makes pointer from integer without a cast
      ./Modules/_ssl.c: In function ‘set_verify_flags’:
      ./Modules/_ssl.c:3410: warning: assignment makes pointer from integer without a cast
      ./Modules/_ssl.c: In function ‘set_host_flags’:
      ./Modules/_ssl.c:3573: warning: assignment makes pointer from integer without a cast
      make: *** [Modules/_ssl.o] Error 1`
  </code></pre>
  
  <p><a href="https://www.tomordonez.com/pip-install-ssl-module-python-is-not-available.html" rel="noreferrer">https://www.tomordonez.com/pip-install-ssl-module-python-is-not-available.html</a></p>