pip 更换国内镜像与记录
更换pip源到国内镜像
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
注意后面要有simple目录!!!
临时使用:
可以在使用pip的时候在后面加上-i参数,指定pip源
pip install scrapy -i https://pypi.tuna.tsinghua.edu.cn/simple
永久修改:
window:创建或者修改在%HOMEPATH%\pip\pip.ini
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
怎么查看机器的%HomePath%

这样便可以直接打开对应的文件夹

本机win7,地址就上面。
================================================================================
pip安装模块:
λ pip install lxml
λ pip install pandas
λ pip install tushare
好吧,pip安装就这样,但是遇到一个问题,如果有很多要安装的模块咋办,而且我现在已经安装的,我到另外一个环境怎么办,然道再手动一个个安装?
解决方案,freeze
pip freeze 命令,按照一定的格式,输出已安装包列表,就相当于导出现在的安装列表
C:\Users\qhong
λ pip freeze > pip/requirements.txt
在上面我们设置国内源配置的文件夹pip下面,导出现在的pip安装列表

打开requirements.txt
aiohttp==2.2.5
aiomysql==0.0.9
async-timeout==1.4.0
beautifulsoup4==4.6.0
bs4==0.0.1
certifi==2017.7.27.1
chardet==3.0.4
click==6.7
Flask==0.12.2
idna==2.6
itsdangerous==0.24
Jinja2==2.9.6
lxml==3.8.0
MarkupSafe==1.0
multidict==3.1.3
numpy==1.13.1
olefile==0.44
pandas==0.20.3
Pillow==4.2.1
PyMySQL==0.7.11
python-dateutil==2.6.1
pytz==2017.2
requests==2.18.4
six==1.10.0
tushare==0.9.2
urllib3==1.22
virtualenv==15.1.0
Werkzeug==0.12.2
yarl==0.12.0
也可以通过pip list命令进行对比,发现是一样的。
那么怎么导入
C:\Users\qhong
λ pip install -r pip/requirements.txt
http://www.cnblogs.com/xueweihan/p/4981704.html
http://blog.csdn.net/chenghuikai/article/details/55258957
pip 更换国内镜像与记录的更多相关文章
- pip使用国内镜像,豆瓣、清华
pip使用国内镜像,豆瓣.清华 2017年01月18日 22:27:44 阅读数:4416 Python开发的时候需要安装各种模块,而pip是很强大的模块安装工具,但是由于国外官方pypi经常被墙,导 ...
- python中pip添加国内镜像源后显著加速下载
python中pip添加国内镜像源后显著加速下载 更换pip源到国内镜像,很多国外的库下载非常慢,添加国内镜像后安装下载速度提升非常明显(亲测有些可以由几十kb加速到几MB) pip国内的一些镜像阿里 ...
- pip使用国内镜像安装各种库
1. 指定阿里云镜像, 安装requirements.txt中的所有 pip install -i http://mirrors.aliyun.com/pypi/simple/ --trusted-h ...
- pip 更改国内镜像
2 pip 更改国内镜像 pip 默认不使用国内镜像,但是我们可以自己设置 -[pypi 镜像使用帮助] 临时使用 pip install -i https://pypi.tuna.tsinghua. ...
- 让pip 使用国内镜像源
让python的pip使用 国内镜像 国内源: 清华:https://pypi.tuna.tsinghua.edu.cn/simple 阿里云:http://mirrors.aliyun.com/py ...
- gradle更换国内镜像、配置本地仓库地址
gradle更换国内镜像,安装包解压后init.d文件夹下面创建init.gradle文件,内容如下 allprojects{ repositories { def REPOSITORY_URL = ...
- Python pip 使用国内镜像
## 推荐源```https://mirrors.aliyun.com/pypi/simple/ 阿里镜像,速度快.稳定https://pypi.douban.com/simple/ 豆瓣镜像```# ...
- python pip使用国内镜像安装第三方库:命令行或PyCharm
python pip使用国内镜像安装第三方库:命令行或PyCharm 转载: https://blog.csdn.net/lly1122334/article/details/80646996
- pip 使用国内镜像源加速
现在做开发可是真的不容易,好像不论哪一个语言当你使用到包管理工具的时候都要进行一些网络的配置,否则速度慢如龟,无论是 maven 还是 npm 又或者是我们要说的 pip. 更换国内的源好像已经是必备 ...
随机推荐
- Networking---poj1287最小生成树
http://poj.org/problem?id=1287 最小生成树模板题类似的还有:poj1258 hdu1233代码几乎一样: 最小生成树详解 #include<stdio.h> ...
- libevent 网络IO分析
libevent 网络IO分析 Table of Contents 1. 简介 2. 简单使用与入门 2.1. 定时器-timeout 超时回调 2.2. 信号事件 2.3. 读取 socket 3. ...
- JVM学习笔记-内存管理
第一章 内存分配 1. 内存区域. 方法区和堆(线程共享),程序计数器 , VM栈 和 本地方法栈(线程隔离). 1) java虚拟机栈:线程私有.描写叙述的是java方法执行的内存模 ...
- 1.cassandra的搭建
参考: https://blog.csdn.net/ch648966459/article/details/51671276
- go for cryptocurrency
https://blog.conformal.com/category/btcd/ https://github.com/btcsuite/btcd/tree/master/docs https:// ...
- 你知道Windows和WordPress上帝模式吗?
一.Windows 上帝模式 这个玩意出来很久很久了,估计不用多说,知道的同学还是挺多的,不知道的也只要百度一下,你就知道了. 方法很简单,在 Windows 系统任何地方新建一个文件夹,如下命名即可 ...
- PAT World Cup Betting[非常简单]
1011 World Cup Betting (20)(20 分) With the 2010 FIFA World Cup running, football fans the world over ...
- [LeetCode] 312. Burst Balloons_hard tag: 区间Dynamic Programming
Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represented by ...
- GridView 点滴
绑定数据时.在后台给GridView添加事件 protected void grd_RowDataBound(object sender, GridViewRowEventArgs e) { //当前 ...
- python start
由于工作关系,新学习使用了python,感觉能非常快速和方便的开发,看完<简明 Python 教程>就跃跃欲试,实际用的是发现有些和C#的理解不一样 (1)如何筛选元组 例如 recor ...