训练分类模型,在下载好的文件的目录下打开命令窗,配置虚拟环境的时候输入如下
conda create -n cls-42 python==3.9.16
报错如下图
报错文字版在这
Collecting package metadata (current_repodata.json): failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url https://mirrors.bfsu.edu.cn/anaconda/cloud/pytorch/win-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.bfsu.edu.cn/anaconda/cloud/pytorch/win-64'
这个问题可能是由于网络连接不稳定或者镜像源配置不正确导致的。你可以尝试更换镜像源或者使用国内的镜像源来解决问题。
可以尝试更换镜像源,例如使用清华大学镜像源。具体步骤如下:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
然后再执行conda create -n cls-42 python==3.9.16命令。
如果更换镜像源后还是无法解决问题,可以尝试使用国内的镜像源。例如使用阿里云的镜像源。具体步骤如下:
conda config --add channels https://mirrors.aliyun.com/pypi/simple/
conda config --set show_channel_urls yes
然后再执行conda create -n cls-42 python==3.9.16命令。
如果以上两种方法都无法解决问题,可以尝试检查网络连接是否正常,或者等待一段时间后再尝试。