Not able to install Python packages [SSL: TLSV1_ALERT_PROTOCOL_VERSION]

前端 未结 17 2025
一整个雨季
一整个雨季 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:43

    myenv:

    python 2.7.14

    pip 9.0.1

    mac osx 10.9.4


    mysolution:

    1. download get-pip.py manually from https://packaging.python.org/tutorials/installing-packages/

    2. run python get-pip.py


    refs:

    https://github.com/pypa/warehouse/issues/3293#issuecomment-378468534

    https://packaging.python.org/tutorials/installing-packages/

    Securely Download get-pip.py [1]

    Run python get-pip.py. [2] This will install or upgrade pip. Additionally, it will install setuptools and wheel if they’re not installed already.

    Ensure pip, setuptools, and wheel are up to date

    While pip alone is sufficient to install from pre-built binary archives, up to date copies of the setuptools and wheel projects are useful to ensure you can also install from source archives:

    python -m pip install --upgrade pip setuptools wheel

提交回复
热议问题