Not able to install Python packages [SSL: TLSV1_ALERT_PROTOCOL_VERSION]

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

    I ran into this problem as well. The underlying problem is that the ssl library in Python 2.7 versions < 2.7.9 is no longer compatible with the pip mechanism.

    If you are running on Windows, and you (like us) can't easily upgrade from an incompatible version of 2.7, FWIW, I found that if you copy the following files from another install of the latest version of Python (e.g. Python 2.7.15) on another machine to your installation:

        Lib\ssl.py
        libs\_ssl.lib
        DLLs\_ssl.dll
    

    it will effectively "upgrade" your SSL layer to one which is supported; we were then be able to use pip again, even to upgrade pip.

提交回复
热议问题