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
  • 相关阅读:
    windows下python开发环境搭建
    看看两年前的我
    网络函数[00]函数总述
    网络函数[04]connect解析
    网络函数[08]网络读取函数解析
    网络函数[01]套接口地址图解
    网络函数[13]
    网络函数[07]accept解析
    网络函数[10]shutdown解析
    网络函数[14]
  • 原文地址:https://www.cnblogs.com/nulige/p/6806552.html
Copyright © 2011-2022 走看看