Python pip error: “Cannot fetch index base URL https://pypi.python.org/simple/”

后端 未结 6 634
死守一世寂寞
死守一世寂寞 2021-02-05 08:38

I\'m trying to install several packages using pip. When I do this using sudo, this error occurs: \"Cannot fetch index base URL https://pypi.python.org/simple/\". When I execute

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-05 09:04

    I have encountered this problem and found the answer finally solved.

    You can try to add a new file/root/.pip/pip.conf, then write:

    [global]
    index-url=http://pypi.douban.com/simple/ 
    

    in the file.

提交回复
热议问题