1.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
如上所示,在用conda安装包的时候下载包的长度不够导致安装包不成功。原因一般是在下载的时候速度较慢,导致下载timeout而终止。解决办法如下。
解决办法:
解决方案一:我是这样好的,主要还是家里没网。热点太太太慢
设置conda下载的timeout,长一点
conda config --set remote_read_timeout_secs 600.0
解决方案二
url: https://repo.anaconda.com/pkgs/main/linux-64/cudnn-7.0.5-cuda8.0_0.tar.bz2
conda install --offline ./cudnn-7.0.5-cuda8.0_0.tar.bz2
解决方案三
设置额外的源,直接从速度快的源进行下载
清华源
但是现在清华源好像也不快了。
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro/
后续再遇到问题,再次更新,欢迎评论添加