Unable to install any package through pip

前端 未结 2 460
囚心锁ツ
囚心锁ツ 2020-12-22 09:37

For some reason I have issues installing new packages with my pip. I have an OS Sierra environment and everything was working fine before. Now either I use a virtualenv or n

2条回答
  •  Happy的楠姐
    2020-12-22 10:40

    Thanks to @Klaus D. comment (proposed to add: the -v flag in the command), I found out that the URL for:

      http://pypi.python.org/simple/requests/ 
    

    needs to be changed to

      https://pypi.python.org/simple/requests/  (with SSL).
    

    Executing this command worked fine:

    pip install -v requests -i https://pypi.python.org/simple/
    

    Alternatively you can change the pip.conf file as described in one of the answers here:

    [global]
    timeout = 60
    index-url = https://pypi.python.org/simple
    

提交回复
热议问题