zoukankan      html  css  js  c++  java
  • 使用国内镜像源来加速python pypi包的安装

    来源:http://topmanopensource.iteye.com/blog/2004853

    pipy国内镜像目前有:

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

    http://pypi.hustunique.com/  华中理工大学

    http://pypi.sdutlinux.org/  山东理工大学

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

    对于pip这种在线安装的方式来说,很方便,但网络不稳定的话很要命。使用国内镜像相对好一些,

    如果想手动指定源,可以在pip后面跟-i 来指定源,比如用豆瓣的源来安装web.py框架:

    pip install web.py -i http://pypi.douban.com/simple

    注意后面要有/simple目录!!!

    要配制成默认的话,需要创建或修改配置文件(linux的文件在~/.pip/pip.conf,windows在%HOMEPATH%pippip.ini),修改内容为:

    code:

    [global]

    index-url = http://pypi.douban.com/simple

    这样在使用pip来安装时,会默认调用该镜像。

    更多配置参数见:http://www.pip-installer.org/en/latest/configuration.html

    Configuration

    Config file

    pip allows you to set all command line option defaults in a standard ini style config file.

    The names and locations of the configuration files vary slightly across platforms.

    • On Unix and Mac OS X the configuration file is: $HOME/.pip/pip.conf
    • On Windows, the configuration file is: %HOME%pippip.ini

    You can set a custom path location for the config file using the environment variable PIP_CONFIG_FILE.

    The names of the settings are derived from the long command line option, e.g. if you want to use a different package index (--index-url) and set the HTTP timeout (--default-timeout) to 60 seconds your config file would look like this:

    更多内容参见来源

  • 相关阅读:
    kubernetes之secret
    kubernetes的核心组件功能
    ingress
    服务发现: coredns
    service
    deployment控制pod进行滚动更新以及回滚
    init container
    service与pod关联
    Joiner
    SpringMVC 用注解Annotation驱动的IoC功能@Autowired @Component
  • 原文地址:https://www.cnblogs.com/hhj187/p/4718589.html
Copyright © 2011-2022 走看看