# pip使用相关

## 一、换国内源

1. 创建pip配置文件

   ```bash
    mkdir ~/.pip
    vim ~/.pip/pip.conf
   ```
2. 在配置文件中写入以下内容

   ```bash
    [global]
    timeout = 6000
    index-url = http://mirrors.aliyun.com/pypi/simple/
    trusted-host = pypi.tuna.tsinghua.edu.cn
   ```
