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
  • 相关阅读:
    Android Studio 插件
    天气预报接口api(中国天气网)
    使用easyui的Tree 实现无限子节点绑定
    js调用后台方法
    div窗口效果来自标准之路
    C#生成dll程序集文件
    一个技术人的博客
    HTML-embed标签详解
    网站生成桌面快捷图标
    文本框宽度自动适应文本宽度
  • 原文地址:https://www.cnblogs.com/nulige/p/6806552.html
Copyright © 2011-2022 走看看