I am trying to install a Python library using pip
, getting an SSL error:
~/projects/base pre-master± pip install xdict
Collecting xdict
Co
Check your TLS version:
python2 -c "import urllib2,json; print(json.loads(urllib2.urlopen('https://www.howsmyssl.com/a/check').read())['tls_version'])"
If your TLS version is less than 1.2 you have to upgrade it since the PyPI repository is on a brownout period of deprecating early TLS.
Source - Time To Upgrade Your Python: TLS v1.2 Will Soon Be Mandatory
You can upgrade the TLS version using the following command:
sudo apt-get update && sudo apt-get install openssl libssl-dev
This should fix your problem. Good luck!
EDIT: You can download packages using your own private python package repository regardless of TLS version. Private Python Package Repository