# Python 代理配置 ## pip ```sh pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/ ``` > 该命令写入配置文件 `~/.config/pip/pip.conf` cat ~/.pip/pip.conf ```conf [global] index-url = http://mirrors.aliyun.com/pypi/simple/ [install] trusted-host=mirrors.aliyun.com ``` 阿里云内网配置 ```sh pip config set global.index-url https://mirrors.cloud.aliyuncs.com/pypi/simple/ ``` ```conf [global] index-url=http://mirrors.cloud.aliyuncs.com/pypi/simple/ [install] trusted-host=mirrors.cloud.aliyuncs.com ```