zoukankan      html  css  js  c++  java
  • Python pip安装报错timeout的解决 pip添加国内镜像源

    由于有些包需在国外,访问速度非常慢,这里我们需要国内的镜像去加速,或者梯子
    1.设置超时时间
    pip --default-timeout=1000 install django
    2.切换国内的镜像源
    (1)临时修改
      使用pip的时候在后面加上-i参数,指定pip源 
    pip install -i https://pypi.douban.com/simple XXXXX
    (2) 永久修改
    pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

    pip.ini的内容

    [global]
    index-url = https://pypi.tuna.tsinghua.edu.cn/simple
    
    **常用的镜像源**
    阿里云:https://mirrors.aliyun.com/pypi/simple/
    中国科技大学:https://pypi.mirrors.ustc.edu.cn/simple/
    清华大学:https://pypi.tuna.tsinghua.edu.cn/simple/
    豆瓣:http://pypi.douban.com/simple/
    等等
    
  • 相关阅读:
    ssd笔记
    深度学习 参数笔记
    NVIDIA驱动安装
    下载大文件笔记
    vue中使用echart笔记
    torch.no_grad
    暑期第二周总结
    暑期第一周总结
    第十六周学习进度
    期末总结
  • 原文地址:https://www.cnblogs.com/zhuhuibiao/p/15475689.html
Copyright © 2011-2022 走看看