参考资料:
①https://blog.csdn.net/weixin_44547510/article/details/124888814?spm=1001.2014.3001.5506
②nco参考资料:https://anaconda.org/conda-forge/nco
③https://blog.csdn.net/qq_326324545/article/details/121288800
根据参考资料①,安装nco时候,不能在ananconda 的base环境下安装,需要创建一个新的虚拟环境
conda create -n nco
conda activate nco
根据参考资料②:
conda install -c conda-forge nco
根据参考资料③,如果conda forge非常慢的话,更换为国内镜像资源:
(nco)目录> conda config --set show_channel_urls yes
然后在目录下找到.condarc文件,用记事本打开,将所有文本替换成以下内容,并保存退出。
# This is a sample .condarc file.
# It adds mirror-channel(Tsinghua University) of anaconda and enables
# the show_channel_urls option.
# channel locations. These override conda defaults, i.e., conda will
# search *only* the channels listed here, in the order given.
# Use "defaults" to automatically include all default channels.
# Non-url channels will be interpreted as Anaconda.org usernames
# (this can be changed by modifying the channel_alias key; see below).
# The default is just 'defaults'.
channels:
- defaults
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
simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
# Show channel URLs when displaying what is going to be downloaded
# and in 'conda list'. The default is False.
show_channel_urls: true
# For more information about this file see:
# https://conda.io/docs/user-guide/configuration/use-condarc.html
然后在anaconda prompt中执行
conda install -c conda-forge nco即可安装成功