当前位置: 移动技术网 > 网络运营>服务器>Linux > pip清华镜像源使用方法总结

pip清华镜像源使用方法总结

2020年07月07日  | 移动技术网网络运营  | 我要评论

临时使用

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple package-name

注意,simple 不能少, 是 https 而不是 http

设为默认

修改

 ~/.config/pip/pip.conf (Linux)

 C:\Users\xxxxx\pip\pip.ini (Windows 10)

 $HOME/Library/Application Support/pip/pip.conf (macOS)

(没有就创建一个)

修改 index-url

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple

pip 和 pip3 并存时,只需修改 ~/.pip/pip.conf

或者终端输入

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

 

本文地址:https://blog.csdn.net/DragonGirI/article/details/107143023

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网