zoukankan      html  css  js  c++  java
  • python使用国内镜像库

    使用python虽然导入库非常方便,但有时也会碰到许多的问题。下载速度有时候很慢。在网上找来了一个关于将python的pip调成寻找国内镜像的方法。

    国内镜像地址:

    http://pypi.douban.com/simple/   豆瓣

    http://mirrors.aliyun.com/pypi/simple/   阿里

    http://pypi.hustunique.com/simple/   华中理工大学

    http://pypi.sdutlinux.org/simple/   山东理工大学

    http://pypi.mirrors.ustc.edu.cn/simple/   中国科学技术大学

    https://pypi.tuna.tsinghua.edu.cn/simple   清华

    如何使用

    1、临时使用,添加“-i”或“--index”参数

    pip install -i http://pypi.douban.com/simple/ flask

    2、配制成默认的

    在你的“C:Users你的用户名”目录下创建“pip”目录,“pip”目录下创建“pip.ini”文件(注意:以UTF-8 无BOM格式编码);

    “pip.ini”文件内容:

    [global]

    index-url=http://mirrors.aliyun.com/pypi/simple/

    [install]

    trusted-host=mirrors.aliyun.com

    注意:trusted-host 选项为了避免麻烦是必须的,否则使用的时候会提示不受信任,或者添加“--trusted-host=mirrors.aliyun.com”选项

    参考:https://www.cnblogs.com/htx18/p/11834123.html

  • 相关阅读:
    HDU 4346 The Beautiful Road ( 反向考虑 思路题 )
    HTTP 之缓存
    HTTP head meta
    Git远程操作
    git fetch和push的区别
    git 提交 src refspec master does not match any
    git提交远程报错[rejected] master -> master (fetch first)
    (转载)git常用命令
    Git配置和常用命令
    git常用命令(三)
  • 原文地址:https://www.cnblogs.com/pu369/p/12587735.html
Copyright © 2011-2022 走看看