zoukankan      html  css  js  c++  java
  • 安装pip源

    国内源地址:

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

    临时使用命令:

    pip install web.py -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
    
    备注:把web.py 改成你要这的软件名称

    临时使用源python脚本:

    #!/usr/bin/python
    import os
    package = raw_input("Please input the package which you want to install!
    ")
    command = "pip install %s -i http://pypi.mirrors.ustc.edu.cn/simple --trusted-host pypi.mirrors.ustc.edu.cn" % package
    os.system(command)

    linux和windows配置成默认的源的方法:

    存放在root目录下:

    [root@jumpserver pip]# pwd
    /root/pip
    
    [root@jumpserver pip]# ll
    total 4
    -rw-r--r-- 1 root root 52 May  4  2017 pip.conf
    

    内容:

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

    windows系统:在%HOMEPATH%pippip.ini

    内容:

    [global]
    index-url = http://pypi.douban.com/simple
    [install]
    trusted-host=pypi.douban.com
  • 相关阅读:
    从点子到产品
    基础设计模式
    SpringBoot单元测试
    结构化思维
    考试脑科学读书笔记
    爆发式成长的思维
    人人都是产品经理笔记
    文本处理工具awk
    CSP-S2019【绍兴一中集训】
    寒假集训【1.28】
  • 原文地址:https://www.cnblogs.com/nulige/p/6806552.html
Copyright © 2011-2022 走看看