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

~/.pip/pip.conf

The documentation says the config file for Windows is %HOME%\pip\pip.ini, but pip actually looks for %APPDATA%\pip\pip.ini. It only uses %HOME% if %APPDATA% isn't set.

 

On Windows pip should look for its config file in the 'pip' subdirectory of
the user's Home directory (as returned by os.path.expanduser('~')). The
%APPDATA% directory is hidden by default, so it seems it's not intended for
users to modify it directly.

 

The fix is just a matter of removing one line from locations.py. I'm attaching
a diff.

 

%HOME% = C:\Users\<usrname>, e.g. C:\Users\zpc

 

windows:

"C:\Users\zpc\pip\pip.ini"

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

非官方的python第三方软件包安装地址

http://www.lfd.uci.edu/~gohlke/pythonlibs/

pip切换国内的源的更多相关文章

  1. python中pip添加国内镜像源后显著加速下载

    python中pip添加国内镜像源后显著加速下载 更换pip源到国内镜像,很多国外的库下载非常慢,添加国内镜像后安装下载速度提升非常明显(亲测有些可以由几十kb加速到几MB) pip国内的一些镜像阿里 ...

  2. pip 使用国内镜像源加速

    现在做开发可是真的不容易,好像不论哪一个语言当你使用到包管理工具的时候都要进行一些网络的配置,否则速度慢如龟,无论是 maven 还是 npm 又或者是我们要说的 pip. 更换国内的源好像已经是必备 ...

  3. 让pip 使用国内镜像源

    让python的pip使用 国内镜像 国内源: 清华:https://pypi.tuna.tsinghua.edu.cn/simple 阿里云:http://mirrors.aliyun.com/py ...

  4. brew 切换国内的源

    切换到国内源 # 替换brew.git: cd "$(brew --repo)" # 中国科大: git remote set-url origin https://mirrors ...

  5. 为 Ubuntu/Anaconda/pip 添加国内下载源

    背景 正在看 tensorflow-lite 压缩模型的部分,结果 tutorial 一上来就要卸旧版安装 tf-nightly (新版?反正小白下就vans了) 然而好不容易才编译好源码舍不得删.又 ...

  6. pip使用国内镜像/源的方法

    一.修改配置文件 pip配置文件的路径如下,没有的话新建一个: linux/msys2等是:用户目录/.pip/pip.confwindows是:用户目录/pip/pip.ini 用户目录通过下行命令 ...

  7. python pip 更换国内安装源(windows)

    1.点击此电脑,在最上面的的文件夹窗口输入 : %APPDATA% 2.按回车跳转到以下目录,新建pip文件夹 3.创建pip.ini文件 4.打开文件夹,输入以下内容,关闭即可(注意:源镜像可替换) ...

  8. pip使用国内镜像源

    windows版 1.在windows文件管理器中,输入 %APPDATA% 2.在该目录下新建pip文件夹,然后到pip文件夹里面去新建个pip.ini文件 3.在新建的pip.ini文件中输入以下 ...

  9. PIP 更换国内安装源

    linux: 修改 ~/.pip/pip.conf (没有就创建一个), 内容如下: [global] index-url = https://pypi.tuna.tsinghua.edu.cn/si ...

随机推荐

  1. C语言进阶——关于07中指针的补充

    首先我们应该了解指针可以分为: 野指针: 野指针不是NULL指针,是未初始化或未清零的指针,他指向的内存地址不是程序员想要的.人们一般不会错用NULL指针,因为用if语句很容易判断.但是“野指针”是很 ...

  2. C++ 二叉搜索树

    二叉搜索树利用其特有的二叉树性质,使其搜索更方便 源代码: struct node { int val; node *left, *right; }; //the function of insert ...

  3. python-7面向对象高级编程

    1-给类动态增加方法 class Student(object): pass def set_score(self, score): self.score = score Student.set_sc ...

  4. Python 探测图片文件类型

    Table of Contents 1. 探测图片类型 1.1. python magic 1.2. imghdr 1.3. PIL.Image 探测图片类型 今天遇到一个小问题,如何探测图片的文件类 ...

  5. ansible-3

    setup ansible_all_ipv4_addresses # ipv4的所有地址 ansible_all_ipv6_addresses # ipv6的所有地址 ansible_date_tim ...

  6. 读json文件发生错误,所遇到的坑

    当我们生产者生产json 文件的时候   消费时用JSON读文件时,如下: val values = kafkardd.map(t=>JSON.parseObject(t._2)) 如果发生以下 ...

  7. Pascal游戏 大富翁MUD

    大富翁MUD Pascal源码 Chaobs改编自百度网友作品 此源码非Chaobs原创,但转载时请仍注明出处. 估计90后以后就没有孩子知道MUD了. program wxtw; uses crt; ...

  8. python学习笔记一:数据类型

    一.Python文件类型 1.源代码 hello.py: 1 #!/usr/bin/python 2 print "hello world" 2.字节代码:python源文件经编译 ...

  9. Python 3基础教程3-数学运算

    本文来介绍下Python中的常见数学运算,其实和其他语言一样,加减乘除语法差不多,这里注意下Python中指数的表示方法. # 这里介绍 常见的数学运算 # 加法print(5 + 8) # 减法pr ...

  10. lo口环路问题分析

    流程如下,collecter抓取网卡lo和wlan0数据,其中lo口无数据,wlan0是笔记本上网网口,然后按自定义协议把数据包通过lo口发给后端dispatch进行分发! 这种模式下,抓包程序每经过 ...