阿丹:
记录一下配置快速换源-没有废话
使用命令行工具更换源-全局替换
pip config set global.index-url 需要替换的新源
在使用pip命令时,可以通过`-i`参数来指定新的源。例如:
pip install -i 替换新源 package_name
其中,`替换为新源的URL`是你要更换的源的地址,`package_name`是要安装的包名。
常用的pip源:
1. 中科大源(https://pypi.mirrors.ustc.edu.cn/simple/)
中科大源是中国科学技术大学提供的镜像源,速度快且稳定。
2. 豆瓣源(https://pypi.douban.com/simple/)
豆瓣源是豆瓣提供的镜像源,速度也比较快。
3. 清华源(https://pypi.tuna.tsinghua.edu.cn/simple/)
清华源是清华大学提供的镜像源,速度较快。
4. 阿里云源(http://mirrors.aliyun.com/pypi/simple/)
阿里云源是阿里云提供的镜像源,速度也比较快。