更换软件换源
参考:anaconda | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
- 打开anaconda prompt
- 执行
conda config --set show_channel_urls yes
- 用户目录
C:\Users{yourname}\
下出现.condarc
文件 - 修改该文件
channels: - defaults show_channel_urls: true default_channels: - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2 custom_channels: conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud pytorch-lts: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
- 运行
conda clean -i
清除索引缓存,保证用的是镜像站提供的索引
安装配置步骤
- 下载Minicondahttps://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/
- 配置环境变量
{安装路径}\Miniconda3; {安装路径}\Miniconda3\Scripts; {安装路径}\Miniconda3\Library\bin;
在pycharm的终端中使用自建虚拟环境
C:\Program Files\PowerShell\7\pwsh.exe -ExecutionPolicy ByPass -NoExit -Command "& 'E:\CodeTools\Miniconda3\shell\condabin\conda-hook.ps1' ; conda activate python37 "
卸载
conda install anaconda-clean
anaconda-clean --yes
sudo rm -rf <miniconda_install_dir>