34

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
  • 21,768
  • 32
  • 114
  • 200
James Carter
  • 753
  • 1
  • 9
  • 18

9 Answers9

25

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.

Inigo Selwood
  • 665
  • 6
  • 17
  • 1
    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
  • 1
    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
18

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.

7

Try your install/update with pip3 instead of pip.

AFK
  • 392
  • 5
  • 12
6

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
  • 230,875
  • 49
  • 477
  • 553
zqcolor
  • 312
  • 2
  • 4
  • 12
4

Activate your base conda environment:

conda activate base

Bob
  • 5,131
  • 4
  • 32
  • 50
4

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.

Sourabh SInha
  • 2,054
  • 14
  • 20
3

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

Student222
  • 2,871
  • 2
  • 16
  • 24
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
  • 67
  • 1
  • 10
0

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

RedEyed
  • 1,804
  • 1
  • 20
  • 26