Python
环境设置
环境设置
修改pip镜像源
临时使用镜像源
pip install -i https://mirrors.aliyun.com/simple some-package --trusted-host mirrors.aliyun.com
默认使用镜像源
Pip的配置文件为用户根目录下的:~/.pip/pip.conf(Windows路径为:$HOME\pip\pip.ini),可以通过手动创建或者修改该文件
[global]
index-url = https://mirrors.aliyun.com/pypi/simple
trusted-host = mirrors.aliyun.com
timeout = 120
命令行方式修改
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple