Python pip 使用国内镜像

## 推荐源

```
https://mirrors.aliyun.com/pypi/simple/ 阿里镜像,速度快、稳定
https://pypi.douban.com/simple/ 豆瓣镜像
```
## 使用方法

### 1. 使用时修改

```
pip install -i [国内镜像地址] [模块名称]
```

### 2. 修改配置文件

修改或创建`~/.pip/pip.conf`

文件内容:
```
[global]
index-url = https://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com
```

## 参考链接
[让python pip使用国内镜像](https://www.cnblogs.com/wqpkita/p/7248525.html "让python pip使用国内镜像")

猜你喜欢

转载自www.cnblogs.com/boxker/p/10853738.html