36

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.

Hossein
  • 24,202
  • 35
  • 119
  • 224
James Carter
  • 803
  • 2
  • 10
  • 18

10 Answers10

32

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.

vvvvv
  • 25,404
  • 19
  • 49
  • 81
Inigo Selwood
  • 822
  • 9
  • 20
  • 2
    Worked for me on Win10. Why is /Library not added to PATH by anaconda3 by default?! – Dmitry Avtonomov Apr 08 '20 at 17:16
  • 1
    This solution was the only one that works for me thank you very much. Win 10 pro – Rafael Díaz Aug 03 '20 at 03:44
  • 2
    that solution works. that file `anaconda3\Library\bin\libssl-1_1-x64.dll` should be in `$PATH` – ivan866 Aug 16 '20 at 20:16
  • Worked for me as well but I didn't have to upgrade pip (Windows 10). @DmitryAvtonomov I think Anaconda installer now gives you the option whether to add to path or not. By defualt the option is not selected and it's "not recommended" – Abdelrahman Shoman Jul 03 '21 at 15:20
  • If the environment is within QGIS and Anaconda is not in the equation at all, is there an alternative? None of these solutions work for me. – CNIDog Feb 22 '22 at 17:26
19

I had exactly the same problem. My computer is exactly the same and the versions of Python and pip are also the same.

It's a dll conflict with libeay32.dll.

I can solve this problem by adding dir path of python which has libeay32.dll (in my case C:\Users\Gabriel\Anaconda3\pkgs\openssl-1.1.1a-he774522_0\Library\bin) in system environment as topmost position.

8

I had the same issue when I created a new environment in anaconda, activated it and tried to install a library with pip. What was missing was:

conda install pip

then everything worked for me.

nofoobar
  • 2,826
  • 20
  • 24
  • Not the same situation as I already had a currently operational pip, but something did get mucked up by me. Either way, this also served to solve my issue before taking the nuclear approach! thanks! – Maxim Nov 10 '22 at 22:37
7

Try your install/update with pip3 instead of pip.

AFK
  • 412
  • 6
  • 12
7

I do not have libeay32.dll in bin folder either, but after adding C:\Users\<user name>\Anaconda3\pkgs\openssl-1.1.1a-he774522_0\Library\bin to the top of path, it is working. This is on Windows 10 64-bit.

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
zqcolor
  • 332
  • 2
  • 4
  • 13
5

Activate your base conda environment:

conda activate base

Bob
  • 5,809
  • 5
  • 36
  • 53
4

Adding "<Path to miniconda or anaconda>\Library\bin" folder to PATH solved this problem for me.

Student222
  • 3,021
  • 2
  • 19
  • 24
1

Add <Path to miniconda or anaconda>\Library\bin folder to PATH or
cd <Path to miniconda or anaconda>\Library\bin>

RedEyed
  • 2,062
  • 1
  • 23
  • 26
0

Activating the base and then activated my Django environment.

(Django_env) (base) C:\virtual_environment\Django_env> , which actually worked for me.

Megha Bhamare
  • 77
  • 1
  • 10
0

just a note how to find wich library is missing

$ python -m ssl
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.9/ssl.py", line 99, in <module>
    import _ssl             # if we can't import it, let the error propagate
ImportError: libssl.so.1.1: cannot open shared object file: No such file or directory
mnach
  • 520
  • 1
  • 4
  • 9