因为各种各样的原因,很多国外的库在国内使用速度很慢,这就需要更换下载源,各种包管理器的更换方式有不一样,所以在这里汇总一下,方便查找
pip
linux下,修改 ~/.pip/pip.conf (没有就创建一个), 修改 index-url至tuna,内容如下:
1
2[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simplewindows下,直接在user目录中创建一个pip目录,如:C:\Users\xx\pip,新建文件pip.ini,内容如下
1
2[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple