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

后端 未结 30 882
后悔当初
后悔当初 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:30

    In my case (Python 3.4, in a virtual environment, running under macOS 10.10.6) I could not even upgrade pip itself. Help came from this SO answer in the form of the following one-liner:

    curl https://bootstrap.pypa.io/get-pip.py | python

    (If you do not use a virtual environment, you may need sudo python.)

    With this I managed to upgrade pip from Version 1.5.6 to Version 10.0.0 (quite a jump!). This version does not use TLS 1.0 or 1.1 which are not supported any more by the Python.org site(s), and can install PyPI packages nicely. No need to specify --index-url=https://pypi.python.org/simple/.

提交回复
热议问题