Not able to install Python packages [SSL: TLSV1_ALERT_PROTOCOL_VERSION]

前端 未结 17 2018
一整个雨季
一整个雨季 2020-11-21 13:16

I am trying to install a Python library using pip, getting an SSL error:

~/projects/base  pre-master±  pip install xdict

Collecting xdict
  Co         


        
17条回答
  •  遇见更好的自我
    2020-11-21 13:59

    The answers of installing pip via:

    1. curl https://bootstrap.pypa.io/get-pip.py |sudo python or
    2. curl https://bootstrap.pypa.io/get-pip.py | python

    did not work for me as I kept on getting the error:

    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
    ERROR: Could not find a version that satisfies the requirement pip (from versions: none)
    ERROR: No matching distribution found for pip
    

    I had to install pip manually via:

    1. Go the pip distribution website
    2. Download the tar.gz version
    3. Unpack the file locally and cd into the directory
    4. run python setup.py install

提交回复
热议问题