Conda 修改镜像源
- 查看目前已有的channel:
conda config --show channels
- 添加新的channel:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --set show_channel_urls yes
- 在安装pytorch时,本人使用的cuda版本为10.1
conda install pytorch torchvision cudatoolkit=10.1
千万不能末位加上-c pytorch,是因为-c参数指明了下载pytorch的通道,优先级比清华镜像更高