Search code examples
pythondownloadopensslpipanaconda

"pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available"


I have the anaconda package and run Spyder. Here is my system information:

anaconda                  2018.12                  py37_0

Python                    3.7.1

pip                       18.1

Dell Inspiron 13 7000 64-bit

I am unable to install anything with pip from the command prompt. I get the following when trying to install numpy for instance (which I already have through anaconda):

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

Requirement already satisfied: numpy in c:\users\uday rallabhandi\anaconda3\lib\site-packages (1.15.4)

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

Please help me understand why this is happening.


Solution

  • Here was my process to correct the error, on Windows 10 with Anaconda:

    1. Added the following paths to my environment variables:
    • /AppData/Local/Continuum/Anaconda3
    • /AppData/Local/Continuum/Anaconda3/Scripts
    • /AppData/Local/Continuum/Anaconda3/Library
    • /AppData/Local/Continuum/Anaconda3/Library/Bin

    At this stage, the error message was still there.

    1. From Anaconda Prompt, I installed the latest version of pip:

      python -m pip install --upgrade pip
      

    This appeared to correct the DLL conflict.