- 访问浙江大学镜像站当中的 Miniforge
- 选中合适的版本并下载,也可以直接执行下面的命令
bash
cd ~
wget https://mirrors.zju.edu.cn/miniforge/Miniforge3-Linux-x86_64.sh
- 安装 Miniforge
bash
./Miniforge3-Linux-x86_64.sh
- 安装完毕以后给 conda 和 mamba 换源
bash
vim ~/.bashrc
bash
custom_channels:
conda-forge: https://mirrors.zju.edu.cn/anaconda/cloud
msys2: https://mirrors.zju.edu.cn/anaconda/cloud
bioconda: https://mirrors.zju.edu.cn/anaconda/cloud
menpo: https://mirrors.zju.edu.cn/anaconda/cloud
pytorch: https://mirrors.zju.edu.cn/anaconda/cloud
pytorch-lts: https://mirrors.zju.edu.cn/anaconda/cloud
simpleitk: https://mirrors.zju.edu.cn/anaconda/cloud
上面的配置包含了常用的源,如果有额外的需要,可以在浙江大学镜像站官网自己勾选

- 给 pip 换源
bash
mamba activate base
pip config set global.index-url https://mirrors.zju.edu.cn/pypi/web/simple # 浙大源,仅推荐浙江大学校内使用
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/ # 阿里源