报错:
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/conda-forge/linux-64/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//conda.anaconda.org/conda-forge/linux-64'
网上大多回答都是更换源,但根据他们的操作换源之后还是不行,另外之前在查看源的时候发现
channel_priority: disabled
channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
虽然源很多,但是channel_priority为disabled
可以使用以下方式查看描述
conda config --describe channel_priority
# # channel_priority (ChannelPriority)
# # Accepts values of 'strict', 'flexible', and 'disabled'. The default
# # value is 'flexible'. With strict channel priority, packages in lower
# # priority channels are not considered if a package with the same name
# # appears in a higher priority channel. With flexible channel priority,
# # the solver may reach into lower priority channels to fulfill
# # dependencies, rather than raising an unsatisfiable error. With channel
# # priority disabled, package version takes precedence, and the
# # configured priority of channels is used only to break ties. In
# # previous versions of conda, this parameter was configured as either
# # True or False. True is now an alias to 'flexible'.
后添加的channel 有更高的优先级, 即在检索软件时,会优先检索更高优先级的channel.
conda config --set channel_priority flexible
改回flexible运行成功