1

When I run the pip install CryptContext or pip install ssl commands I get this message:

Downloading/unpacking ssl
Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement ssl
Cleaning up...
No distributions at all found for ssl
Storing debug log for failure in /Users/chauncey/.pip/pip.log
Chaunceys-MacBook-Pro-2:dist chauncey$ pip install CryptContext
Downloading/unpacking CryptContext
  Cannot fetch index base URL https://pypi.python.org/simple/
  Could not find any downloads that satisfy the requirement CryptContext
Cleaning up...
No distributions at all found for CryptContext
Storing debug log for failure in /Users/chauncey/.pip/pip.log

When I look in the pip.log file I get the following:

/Library/Frameworks/Python.framework/Versions/2.7/bin/pip run on Sun Dec  1 20:45:23 2019
Downloading/unpacking CryptContext
  Getting page https://pypi.python.org/simple/CryptContext/
  Could not fetch URL https://pypi.python.org/simple/CryptContext/: connection error: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:581)
  Will skip URL https://pypi.python.org/simple/CryptContext/ when looking for download links for CryptContext
  Getting page https://pypi.python.org/simple/
  Could not fetch URL https://pypi.python.org/simple/: connection error: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /simple/ (Caused by <class 'httplib.CannotSendRequest'>: )
  Will skip URL https://pypi.python.org/simple/ when looking for download links for CryptContext
  Cannot fetch index base URL https://pypi.python.org/simple/
  URLs to search for versions for CryptContext:
  * https://pypi.python.org/simple/CryptContext/
  Getting page https://pypi.python.org/simple/CryptContext/
  Could not fetch URL https://pypi.python.org/simple/CryptContext/: connection error: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:581)
  Will skip URL https://pypi.python.org/simple/CryptContext/ when looking for download links for CryptContext
  Could not find any downloads that satisfy the requirement CryptContext

I narrowed it down to this line:

Could not fetch URL https://pypi.python.org/simple/CryptContext/: connection error: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:581)

I then ran the following commands:

sudo mv /usr/bin/openssl /usr/bin/openssl_old
sudo ln -s /usr/local/Cellar/openssl/1.0.2g/bin/openssl /usr/bin/openssl

After this I ran openssl version -a and got the following:

OpenSSL 1.0.2g  1 Mar 2016

built on: reproducible build, date unspecified
platform: darwin64-x86_64-cc
options:  bn(64,64) rc4(ptr,int) des(idx,cisc,16,int) idea(int) blowfish(idx) 
compiler: clang -I. -I.. -I../include  -fPIC -fno-common -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -arch x86_64 -O3 -DL_ENDIAN -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM
OPENSSLDIR: "/usr/local/etc/openssl"

However when I check the pip.log file they're still saying the same error specified above.

My Mac is pretty old. It's Version 10.7.6.

halfer
  • 19,824
  • 17
  • 99
  • 186
SonOfSeuss
  • 400
  • 5
  • 18

0 Answers0