python 使用pip进行安装报install timeout

主要有两种方式进行问题的解决

1.选择国内的镜像来解决问题。

  在Windows下:

  C:\Users\Administrator\下新建pip文件夹,在创建pip.ini文件,拷贝下面代码进去,保存。

  [global]
  index-url = https://pypi.tuna.tsinghua.edu.cn/simple
 就是把下载源换成清华的

2.延长等待时间完美解决问题

windows下在cmd中,输入如下命令:

 pip --default-timeout=100 install -U pip

经过测试,第一种方法比较的可行

猜你喜欢

转载自blog.csdn.net/zhuoyue008/article/details/81135650