CondaError: Downloaded bytes did not match Content-Length
url: https://repo.anaconda.com/pkgs/main/linux-64/python-3.7.13-haa1d7c7_1.tar.bz2
target_path: /home/xxx/.conda/pkgs/python-3.7.13-haa1d7c7_1.tar.bz2
Content-Length: 48678970
downloaded bytes: 11008397
用conda create -n name python=3.x语句创建新的项目环境时,发现python包不仅下载的慢,还容易报错如上,可以尝试用清华镜像源下载。
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/
再重新执行
conda create -n name python=3.x
这时候会发现不仅下载迅速,而且不会报错。