pip connection failure: cannot fetch index base URL http://pypi.python.org/simple/

后端 未结 30 1044
后悔当初
后悔当初 2020-11-28 23:19

I run sudo pip install git-review, and get the following messages:

Downloading/unpacking git-review
  C         


        
30条回答
  •  鱼传尺愫
    2020-11-28 23:37

    I'm now getting this in $HOME/.pip/pip.log:

    Could not fetch URL https://pypi.python.org/simple/: HTTP Error 403: TLSv1.2+ is required
    

    I don't have a straightforward solution for this, but I'm mentioning it as something to watch out for before you waste time on trying some of the other solutions here.

    • I'm obviously already using a https URL
    • There is no proxy or firewall issue
    • Using trusted-host didn't change anything (dunno where I picked this up)

    For what it's worth my openssl is too old to even have ssl.OPENSSL_VERSION so maybe that's really the explanation here.

    In the end, wiping my virtual environment and recreating it with virtualenv --setuptools env seems to have fixed at least the major blockers.

    This is on a really old Debian box, Python 2.6.6.

提交回复
热议问题