1、查看当前镜像
(base) C:\Users\jcomhome>conda info
active environment : base
active env location : F:\miniconda\miniconda-install
shell level : 1
user config file : C:\Users\jcomhome\.condarc
populated config files :
conda version : 4.10.3
conda-build version : not installed
python version : 3.9.5.final.0
virtual packages : __cuda=8.0=0
__win=0=0
__archspec=1=x86_64
base environment : F:\miniconda\miniconda-install (writable)
conda av data dir : F:\miniconda\miniconda-install\etc\conda
conda av metadata url : None
channel URLs : https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : F:\miniconda\miniconda-install\pkgs
C:\Users\jcomhome\.conda\pkgs
C:\Users\jcomhome\AppData\Local\conda\conda\pkgs
envs directories : F:\miniconda\miniconda-install\envs
C:\Users\jcomhome\.conda\envs
C:\Users\jcomhome\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.10.3 requests/2.25.1 CPython/3.9.5 Windows/10 Windows/10.0.18362
administrator : False
netrc file : None
offline mode : False
2、配置文件备份(防止修改过程出错)
(base) C:\Users\jcomhome>copy C:\Users\jcomhome\.condarc C:\Users\jcomhome\.condarc.bak
系统找不到指定的文件。
生成一下配置文件:conda config ,再次查看备份
(base) C:\Users\jcomhome>conda config
(base) C:\Users\jcomhome>copy C:\Users\jcomhome\.condarc C:\Users\jcomhome\.condarc.bak
已复制 1 个文件。
3、修改配置文件
(base) C:\Users\jcomhome>conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
(base) C:\Users\jcomhome>conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
(base) C:\Users\jcomhome>conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
(base) C:\Users\jcomhome>conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro
(base) C:\Users\jcomhome>conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
查看是否添加上:
(base) C:\Users\jcomhome>conda info
active environment : base
active env location : F:\miniconda\miniconda-install
shell level : 1
user config file : C:\Users\jcomhome\.condarc
populated config files : C:\Users\jcomhome\.condarc
conda version : 4.10.3
conda-build version : not installed
python version : 3.9.5.final.0
virtual packages : __cuda=8.0=0
__win=0=0
__archspec=1=x86_64
base environment : F:\miniconda\miniconda-install (writable)
conda av data dir : F:\miniconda\miniconda-install\etc\conda
conda av metadata url : None
channel URLs : https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2/win-64
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2/noarch
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro/win-64
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro/noarch
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/win-64
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/noarch
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/noarch
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/win-64
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/noarch
https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : F:\miniconda\miniconda-install\pkgs
C:\Users\jcomhome\.conda\pkgs
C:\Users\jcomhome\AppData\Local\conda\conda\pkgs
envs directories : F:\miniconda\miniconda-install\envs
C:\Users\jcomhome\.conda\envs
C:\Users\jcomhome\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.10.3 requests/2.25.1 CPython/3.9.5 Windows/10 Windows/10.0.18362
administrator : False
netrc file : None
offline mode : False
再次install包,查看安装时是否出现,出现新添加镜像,说明镜像修改成功
|