且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法通过pip安装任何软件包

更新时间:2022-06-13 06:02:38

感谢@Klaus D.注释(建议在命令中添加-v标志),我发现以下URL:

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/ 

需要更改为

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

执行此命令可以正常工作:

Executing this command worked fine:

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

或者,您也可以按照答案之一在此处中所述更改pip.conf文件:

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