服务器-conda下载速度慢-国内源
文章目录
- 前言
- 一、解决问题:使用国内conda镜像下载(差)
- 二、解决问题:使用pip下载(优)
- 总结
前言
conda频道中有无效频道导致下载失败
一、解决问题:使用国内conda镜像下载(差)
- 步骤 1:删除所有现有的频道
首先,你可以删除 Conda 配置中的所有现有频道。执行以下命令来清空当前配置的频道:# 二、使用步骤
conda config --remove-key channels
此命令会删除 Conda 配置中的所有频道条目。
- 步骤 2:使用清华 Conda 镜像源
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
conda config --add channels defaults
conda config --set show_channel_urls yes
步骤3:安装 matplotlib
conda install matplotlib
二、解决问题:使用pip下载(优)
要使用 pip 在 阿里云镜像源 下载和安装 matplotlib,你需要按照以下步骤操作:
- 步骤 1:使用阿里云镜像源安装 matplotlib
在中国大陆地区,使用阿里云的镜像源下载 Python 包能显著加速下载速度。你可以通过以下命令在阿里云镜像源上安装 matplotlib。
pip install matplotlib -i https://mirrors.aliyun.com/pypi/simple/
总结
阿里云并不维护 Conda 官方 anaconda/pkgs/* 镜像