1、鏡像源查看
$ conda config --show-sources
2儒陨、國內(nèi)第三方源添加
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/main
conda config --add channels https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/free
conda config --add channels https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/mro
conda config --add channels https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/msys2
conda config --add channels https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/pro
conda config --add channels https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/r
3花嘶、刪除源
$ conda config --remove channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
4、源報(bào)錯(cuò)處理
報(bào)錯(cuò):
(base) root@ecs-88e2:~# conda create scanpy python=3.7
CondaValueError: The target prefix is the base prefix. Aborting.
(base) root@ecs-88e2:~# conda create -n scanpy python=3.7
Collecting package metadata (current_repodata.json): failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/current_repodata.json>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
'https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64'
處理:查看并刪除報(bào)錯(cuò)的源
(base) root@ecs-88e2:~# conda config --show-sources
==> /root/.condarc <==
channels:
- https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/r
- https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/pro
- https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/msys2
- https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/mro
- https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/free
- https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/main
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
- defaults
(base) root@ecs-88e2:~# conda config --remove channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
(base) root@ecs-88e2:~# conda config --show-sources
==> /root/.condarc <==
channels:
- https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/r
- https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/pro
- https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/msys2
- https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/mro
- https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/free
- https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/main
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
- defaults
(base) root@ecs-88e2:~# conda create -n scanpy python=3.7
Collecting package metadata (current_repodata.json): done
Solving environment: done