Anaconda安装及使用问题


本文内容为在Anaconda安装及使用时遇到的问题,具体下载、安装、环境配置、换源和.condarc文件处理网上有方案,在此不多赘述。

换源后报错CondaHTTPError: HTTP 000 CONNECTION FAILED解决方案

问题描述

Collecting package metadata (current_repodata.json): failed

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-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.
SSLError(MaxRetryError('HTTPSConnectionPool(host=\'mirrors.tuna.tsinghua.edu.cn\', port=443): Max retries exceeded with url: /anaconda/pkgs/main/linux-64/current_repodata.json (Caused by SSLError(SSLError("bad handshake: Error([(\'SSL routines\', \'tls_process_server_certificate\', \'certificate verify failed\')])")))'))

解决方案

关闭conda的ssl验证即可,在Anaconda Prompt中输入命令

conda config --set ssl_verify false

Conda-Downloaded bytes did not match Content-Length问题解决方案

问题描述

CondaError: Downloaded bytes did not match Content-Length
url: https://repo.anaconda.com/pkgs/main/linux-64/cudnn-7.0.5-cuda8.0_0.tar.bz2
target_path: /home/yyf/miniconda3/pkgs/cudnn-7.0.5-cuda8.0_0.tar.bz2
Content-Length: 261398285
downloaded bytes: 47463195

解决方案

一共有三个方案,灵活使用
1. 再次换源
2. 调高conda下载的timeout,再进行尝试,时长不够可以设置大点.
在Anaconda Prompt中输入命令

conda config --set remote_read_timeout_secs 600.0

3. 从conda的源下载好要安装的包,直接采用本地安装的方式。 下载地址
在Anaconda Prompt中输入命令

conda install --offline ./包名

文章作者: Figure
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 Figure !
 上一篇
MySQL学习笔记 MySQL学习笔记
本文使用的是MySQL,内容为学习SQL语句期间遇到的问题和注意事项。参考MySQL菜鸟教程 MySQL 与 [charlist]% 通配符 按照提示使用如下语句匹配不到结果 select * from persons where city
2021-03-17 Figure
下一篇 
My First Blog My First Blog
网站搭建 && first blog需要的软件 Typora个人建议在国内的网站上面下载,不要去官网,下载慢 VS Code轻量级文档编辑器 图片 Test 超链接图片来源 hexo博客引用图片无法显示 网上的解决
2021-01-15 Figure
  目录