PIP 镜像配置
Python
环境安装结束后,由于在国内网络去下载pypi
仓库的包速度比较慢,推荐配置 pip
镜像,可以提高下载速度,避免安装依赖失败,以下两个可任选一个进行配置。
-
阿里镜像(推荐)
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple
pip config set install.trusted-host mirrors.aliyun.com -
清华镜像
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/
pip config set install.trusted-host pypi.tuna.tsinghua.edu.cn