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)完成

  • 相关阅读:
    P1443 马的遍历
    P1747 好奇怪的游戏
    蜀绣
    Five hundred miles
    如果没有你
    Yellow
    流星

    深入理解计算机中的 csapp,h和csapp.c
    可迭代的集合类型使用foreach语句
  • 原文地址:https://www.cnblogs.com/ssyh/p/10949510.html
Copyright © 2011-2022 走看看