I can't get pip to update any packages. Is it an issue with OpenSSL?

61
December 03, 2019, at 01:40 AM

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 11.7.6.

Any help would be appreciated.

READ ALSO
Capture video data from screen in Python

Capture video data from screen in Python

Is there a way with Python (maybe with OpenCV or PIL) to continuously grab frames of all or a portion of the screen, at least at 15 fps or more? I've seen it done in other languages, so in theory it should be possible

68
Powerset algorithm in Python: difference between + and append on lists

Powerset algorithm in Python: difference between + and append on lists

I’m working through the powerset problem in Python

45
Django - Multiple user types (ability to switch between them)

Django - Multiple user types (ability to switch between them)

I am doing some pre-planning on a project I am working on and my approach to itA part of the app is the ability to have multiple user types

52
Function to find number of &#39;ordered combinations&#39; with no particular length of a list Python

Function to find number of 'ordered combinations' with no particular length of a list Python

While variants of this question have been asked numerous times on this site, I haven't found any information on how to do 'ordered combinations' with a given list

64