zoukankan      html  css  js  c++  java
  • pip更换镜像源

    前言

    python的pip安装库很慢,因为它默认的镜像源是国外的,将镜像源换成国内的就很快了,下面介绍怎么更换国内镜像源。

    正文

    国内比较好的镜像源有以下这些:

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

    如果是想临时更换镜像源,通过以下命令:

    pip install scrapy -i https://pypi.tuna.tsinghua.edu.cn/simple

    在后面-i接镜像源就可以了。

    临时更换比较麻烦,建议一劳永逸,把国内的镜像源设成默认就可以了,不过要升级 pip 到最新的版本 (>=10.0.0) 。

    pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
  • 相关阅读:
    oracle的优化-----学习笔记
    面试题-------笔记
    HTTP-1.初相识:了解HTTP协议
    Python-Basis-6th
    Python-Basis-5th
    Python-Basis-4th
    Python-Basis-3rd
    Python-Basis-2nd
    Python-Basis-1st
    scala面向对象编程
  • 原文地址:https://www.cnblogs.com/marvin-wen/p/13064967.html
Copyright © 2011-2022 走看看