Unable to install Python libraries

后端 未结 7 893
名媛妹妹
名媛妹妹 2020-11-27 22:53

I am not able to install any Python libraries. I am using pip 9.0.1 and python 2.7. I am getting the following error:

EN-NishantS:~         


        
7条回答
  •  再見小時候
    2020-11-27 23:27

    Your HTTP request to PyPI fails with an HTTP 403 (Forbidden) error:

    HTTPError: 403 Client Error: TLSv1.2+ is required for url:
    

    https://pypi.python.org/pypi/pip/json

    Apparently pip is trying to access PyPI via HTTPS (which is encrypted and fine), but with an old (insecure) SSL version. Your system seems to be out of date. It might help if you update your packages.

    On Debian-based systems I'd try:

    apt-get update && apt-get upgrade python-pip
    

    On Red Hat Linux-based systems:

    yum update python-pip # (or python2-pip, at least on Red Hat Linux 7)
    

    On Mac:

    sudo easy_install -U pip
    

    You can also try to update openssl separately.

提交回复
热议问题