pip
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package
pypi 镜像每 5 分钟同步一次,所以应该是非常靠谱的
conda
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
比如装pytorch:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda install pytorch torchvision cudatoolkit=10.0
参考:
https://www.cnblogs.com/bonelee/p/9336886.html
https://blog.csdn.net/zzq060143/article/details/88042075