2024年7月16日记录,今天在公司电脑上安装anaconda,安装完成后,我想创建新的虚拟环境,但是一直创建不了,提示
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/noarch/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.
If your current network has https://www.anaconda.com blocked, please file
a support request with your network engineering team.
一开始我以为是被公司的防火墙拦截了,但是后面我ping www.anaconda.com发现是能够ping通的
这届排除了网络问题,后面我怀疑是SSL证书问题导致的HTTPS连接失败,在我使用下面语句
conda config --set ssl_verify no
禁用了SSL证书验证后,此时该问题得到了解决