Python Pip 换国内源
·
1、更新Pip
python -m pip install --upgrade pip
2、永久换源(阿里)
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
3、临时换源(阿里)
pip install markdown -i https://mirrors.aliyun.com/pypi/simple/
4、验证源是否生效
pip config list
5、恢复默认源
删除配置文件或运行:
pip config unset global.index-url
6、国内常用镜像源
镜像源名称 镜像源 URL
阿里云 https://mirrors.aliyun.com/pypi/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
豆瓣 http://pypi.douban.com/simple/
华为云 https://repo.huaweicloud.com/repository/pypi/simple/
腾讯云 https://mirrors.cloud.tencent.com
更多推荐
所有评论(0)