zoukankan      html  css  js  c++  java
  • 更换镜像加快python pip 安装扩展库的速度

    一些镜像源: 清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/ 阿里云 http://mirrors.aliyun.com/pypi/simple/ 中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/ 豆瓣(douban) http://pypi.douban.com/simple/ 中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/

    一.命令行修改

    pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

    二.修改文件

    1.可以直接在pip命令后修改镜像(安装xxx): pip install xxx -i https://pypi.tuna.tsinghua.edu.cn/simple/

    2.永久修改镜像:

    (1)C:Userswin8AppDataRoaming路径下创建一个pip文件夹  (AppData目录可能会隐藏,解决如下图)

    (2)先在pip文件夹中创建一个pip.txt的文本文件,放如下内容: [global] timeout = 60000 index-url = https://pypi.tuna.tsinghua.edu.cn/simple [install] use-mirrors = true mirrors = https://pypi.tuna.tsinghua.edu.cn

    (3)修改文件后缀pip.txt->pip.ini

    (4)完成

  • 相关阅读:
    HashMap死循环造成CPU100%
    ArrayList升级为线程安全的List
    并发容器-ConncurrentHashMap
    并发容器-概览
    不可变性final
    CAS
    原子类-Adder累加器
    hue-使用mysql作为元数据库
    yhd日志分析(二)
    yhd日志分析(一)
  • 原文地址:https://www.cnblogs.com/ssyh/p/10949510.html
Copyright © 2011-2022 走看看