pip install -i https://pypi.douban.com/simple/ flask

要用https的

https://pip.pypa.io/en/latest/user_guide/#configuration

三种配置位置

per-user, per-virtualenv or site-wide (shared amongst all users) configuration

If multiple configuration files are found by pip then they are combined in the following order:

Firstly the site-wide file is read, then

The per-user file is read, and finally

The virtualenv-specific file is read.

运行以下python代码会自动建立pip.ini

"""

python建立pip.ini.py

2016年4月30日 03:35:11 codegay

"""

import os

ini="""[global]

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

[install]

trusted-host=pypi.doubanio.com

"""

pippath=os.environ["USERPROFILE"]+"\\pip\\"

if not os.path.exists(pippath):

    os.mkdir(pippath)

with open(pippath+"pip.ini","w+") as f:

    f.write(ini)

参考链接:

https://segmentfault.com/q/1010000000496093

pip 豆瓣镜像使用的更多相关文章

  1. 更改pip安装源的镜像解决安装总是timeout的情况(pip 豆瓣镜像源)

    由于国外的pip源总是由于各种原因不能被访问或者网速过慢,而造成的timeout错误 解决方法是修改pip的配置文件(如果没有配置文件在相应的地方新建,配置文件的路径和名字参考这里),设置安装包时候访 ...

  2. pip 安装库的时候使用豆瓣镜像 提升效率

    由于众所周知的原因,国内网络环境始终处于水深火热之中,python库的安装也不例外. 比如在安装 PyQt5-tools 的时候,网速奇慢无比. 好在国内有不少镜像服务源,以豆瓣为例,网速突飞猛进 使 ...

  3. pip使用豆瓣镜像源

    pip使用豆瓣的镜像源 豆瓣镜像地址: https://pypi.douban.com/simple/ 虽然用easy_install和pip来安装第三方库很方便 他们的原理其实就是从Python的官 ...

  4. Python中使用pip安装库时指定镜像源为豆瓣镜像源

    场景 在使用pip进行安装库时,使用默认的库会很慢,甚至有时会出现远程主机中断了一个现有连接. 怎样在使用pip install 时指定镜像源为豆瓣镜像源. 实现 pip install moviep ...

  5. 设置 git/npm/bower/pip/gem镜像或代理

    git 设置: $ git config --global http.proxy http://proxy.mysite.com 取消: $ git config --global --unset h ...

  6. Ubuntu16.04下配置pip国内镜像源加速安装【转】

    本文转载自:https://blog.csdn.net/yucicheung/article/details/79095742 问题描述 基于国内网速的问题,我们直接pip安装包通常速度非常慢,而且经 ...

  7. 一学就会pip换镜像源

    首先介绍一个国内好用的镜像站 阿里云 http://mirrors.aliyun.com/pypi/simple/ 豆瓣 http://pypi.douban.com/simple/ 清华大学 htt ...

  8. pip国内镜像(清华大学镜像)

    网上搜到的pip国内镜像大部分是豆瓣的 http://pypi.douban.com/simple/ 但是根本不全,很多包没有 所以推荐清华大学的 https://pypi.tuna.tsinghua ...

  9. PyQt5豆瓣镜像下快速安装

    直接pip安装,慢到你怀疑人生.豆瓣镜像安装,嗯,不能更爽. pip install PyQt5 -i https://pypi.douban.com/simple 谢谢:https://blog.c ...

随机推荐

  1. 加密算法—MD5、RSA、DES

    最近因为要做一个加密的功能,简单了解了一下加密算法,现在比较常用的有三个加密算法MD5加密算法.RSA加密算法.DES加密算法.       MD5加密算法     定义:MD5算法是将任意长度的“字 ...

  2. 使用事件等待句柄EventWaitHandler 实现生产者、消费者队列

    using System; using System.Threading; using System.Collections.Generic; class ProducerConsumerQueue ...

  3. IOS开发 模型赋值 runtime

    #import "CZJsonObject.h" #import <objC/runtime.h> #import <objc/message.h> NSS ...

  4. 浏览器js console对象

    js中调用console写日志 console.log("some log"); console.warn("some warning"); console.e ...

  5. who is the middle

    Description FJ is surveying his herd to find the most average cow. He wants to know how much milk th ...

  6. PHP 使用CURL

    CURL是一个非常强大的开源库,支持很多协议,包括HTTP.FTP.TELNET等,我们使用它来发送HTTP请求.它给我 们带来的好处是可以通过灵活的选项设置不同的HTTP协议参数,并且支持HTTPS ...

  7. linux httpd 服务的安装

    1.查看是否安装了httpd rpm -qa|grep httpd 2.安装httpd 使用yum 安装 yum -y install httpd 3.关闭防火墙和selinxu 4.使用fz软件或者 ...

  8. 注意在<s:if test="#session.user.power==0">中不能用 <s:if test=$sessionScope.user.power==0">

    获取封装在session的对象 用#session.对象名,可以获取对象 用#session.对象名.属性,可以获取属性. 注意在<s:iftest="#session.user.po ...

  9. Arcgis for Javascript 在VS2012中的智能提示

    官方地址: https://developers.arcgis.com/en/javascript/jsapi/api_codeassist.html 安装步骤 Visual Studio 2010 ...

  10. NodeJS http 模块

    #4 NodeJS http 模块 工作目录 server.js var http = require('http'); var fs = require('fs'); var path = requ ...