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

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

    I know this is an old thread, but I encountered this issue today and wanted to share my solution to the problem because I haven't seen this solution elsewhere on SO.

    My environment: Python 2.7.12/2.7.14 on Ubuntu 12.04.5 LTS in a virtualenv, pip version 1.1.

    My Errors:

    pip install nose
    

    in console:

    Cannot fetch index base URL http://pypi.python.org/simple/
    

    in ~/.pip/pip.log:

    Could not fetch URL http://pypi.python.org/simple/: HTTP Error 403: SSL is required
    

    Curious for me because I had been running these same commands in a script without issue for about a year.

    this fixed it:

    pip install --index-url=https://pypi.python.org/simple/ nose
    

    (note the https)

    Hope this helps someone!

提交回复
热议问题