创建虚拟环境安装包都会出现DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443,需要等待很久Solving environment 这就算了 还每次都会失败,报错信息如下
(base) sen1553@sen1553:~/sen_linux/decision-transformer/gym$ conda create -n dt-gym python=3.8.5
Collecting package metadata (current_repodata.json): \ DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
/ DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/r/noarch/current_repodata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/linux-64/current_repodata.json HTTP/1.1" 200 None
\ DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/r/linux-64/current_repodata.json HTTP/1.1" 200 None
| DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/noarch/current_repodata.json HTTP/1.1" 200 None
在此之前已尝试换各种镜像源,代理, 删除环境,但重新创建环境时还是出问题
解决方法
一通搜索后发现了这位博主的帖子,与我遇到的问题一模一样,链接在此,以及这篇帖子的评论区 链接
需要安装conda-build这个包,但我不知道这个报错是因为什么出现的
conda install -c conda-forge conda-build
自动安装的版本为3.27.0
安装时可能还是会报错上述的错误,需要多试几次 耐心等待
成功安装后,当我再次执行创建环境的命令就没有再报错,终于解决了这个问题,被困扰了两天…