zoukankan      html  css  js  c++  java
  • 永久修改 Linux pip国内源

    一些常用的国内源

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

    永久修改pip 国内源

    在用户根目录(~,而非系统根目录 / )下添加配置~/.pip/pip.conf目录添加可信源,如果目录文件不存在,可直接创建。

    [root@localhost ~]# cd 
    [root@localhost ~]# mkdir .pip
    [root@localhost ~]# cd .pip
    [root@localhost .pip]# vim pip.conf

    pip.conf 写入如下内容

    [global]
    index-url=http://pypi.douban.com/simple
    trusted-host = pypi.douban.com 

    加上trusted-host防止pip报警告

  • 相关阅读:
    正则表达式之re模块
    collections模块
    openpyxl模块
    hashlib模块
    random模块
    os模块
    sys模块
    nodeType
    数据类型转换
    添加删除
  • 原文地址:https://www.cnblogs.com/dyd520/p/11867345.html
Copyright © 2011-2022 走看看