zoukankan      html  css  js  c++  java
  • python-----pip安装源选择(亲测有效)

    Python使用pip方法安装第三方包时,需要从 https://pypi.org/ 资源库中下载,但是会面临下载速度慢,甚至无法下载的尴尬。

    使用国内镜像自然是个好方法:

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

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

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

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

    我们可以直接在 pip 命令中使用 -i 参数来指定镜像地址,例如:

    使用清华镜像源安装 numpy 包:pip3 install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple

    永久生效需要做下配置:

    linux:在用户目录下新建.pip/pip.conf,并编辑

    [global]

    index-url = https://pypi.tuna.tsinghua.edu.cn/simple 

    [install]

    trusted-host = https://pypi.tuna.tsinghua.edu.cn

    windows:在用户目录下新建pip.ini,并编辑内容同linux

    比如我的:C:UsersAdministratorAppDatapippip.ini

    内容同linux:

    [global]

    index-url = https://pypi.tuna.tsinghua.edu.cn/simple 

    [install]

    trusted-host = https://pypi.tuna.tsinghua.edu.cn

     
  • 相关阅读:
    CHIL-SQL-NULL 函数
    CHIL-SQL-Date 函数
    CHIL-SQL- ALTER TABLE 语句
    CHIL-SQL-AUTO INCREMENT 字段
    CHIL-SQL-VIEW(视图)
    CHIL-SQL-撤销索引、表以及数据库
    CHIL-SQL-CHECK 约束
    CHIL-SQL-DEFAULT 约束
    CHIL-SQL-CREATE INDEX 语句
    CHIL-SQL-FOREIGN KEY 约束
  • 原文地址:https://www.cnblogs.com/eihouwang/p/14223117.html
Copyright © 2011-2022 走看看