查看: 3518|回复: 0

conda 在断网情况下,离线,创建虚拟环境

[复制链接]

665

主题

1234

帖子

6670

积分

xdtech

Rank: 5Rank: 5

积分
6670
发表于 2020-9-28 08:57:04 | 显示全部楼层 |阅读模式
问题:conda create -n example 创建虚拟环境失败
报错
Solving environment: done
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pk
gs/r/win-64/repodata.json.bz2>
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.
ConnectionError(MaxRetryError(“HTTPSConnectionPool(host=‘repo.anaconda.com’, por
t=443): Max retries exceeded with url: /pkgs/r/win-64/repodata.json.bz2 (Caused
by NewConnectionError(’<urllib3.connection.VerifiedHTTPSConnection object at 0x0
000001A00393C88>: Failed to establish a new connection: [Errno 11004] getaddrinf
o failed’,))”,),)
显示配置内容
conda config --show
显示配置文件的路径
conda config --show-sources
c:\users**.condarc

解决方案:
方案一:断网创建
conda create -n example --offline

方案二:复制base 环境
conda create -n example --clone base
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表