conda配置阿里的镜像源方法
时间: 2023-12-02 18:02:25 浏览: 205
可以按照以下步骤配置conda使用阿里的镜像源:
1. 打开终端或Anaconda Prompt,输入以下命令添加清华源:
```
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 --set show_channel_urls yes
```
2. 输入以下命令添加阿里源:
```
conda config --add channels https://mirrors.aliyun.com/anaconda/pkgs/free/
conda config --add channels https://mirrors.aliyun.com/anaconda/pkgs/main/
conda config --set show_channel_urls yes
```
3. 然后输入以下命令,清除conda的缓存:
```
conda clean -i
```
现在你就可以使用阿里的镜像源来下载conda包了。比如,如果你要下载numpy包,可以输入以下命令:
```
conda install numpy
```
相关问题
配置conda的国内镜像源
可以通过以下步骤配置conda的国内镜像源:
1. 打开Anaconda Prompt或者终端
2. 输入以下命令,添加清华镜像源:
```
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 --set show_channel_urls yes
```
注:也可以使用其他国内镜像源,如阿里云、华为云等。
3. 更新conda:
```
conda update conda
```
4. 验证是否成功:
```
conda info
```
如果看到Channels中有清华的镜像源,则说明配置成功。
注意:在使用conda安装包或者创建虚拟环境时,可以加上参数“-c 清华镜像源地址”,如:
```
conda install numpy -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
```
国内现在的conda配置python镜像源哪个最好用,配置方法是什么
目前国内常用的Python镜像源有清华大学镜像源、阿里云镜像源、华为云镜像源等。其中,清华大学镜像源是比较稳定和受欢迎的一个。
配置方法如下:
1. 打开终端或 Anaconda Prompt。
2. 输入以下命令,添加清华镜像源:
```
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 --set show_channel_urls yes
```
3. 输入以下命令,更新conda:
```
conda update conda
```
4. 如果需要安装Python包,可以使用类似以下命令:
```
conda install numpy
```
以上就是基于清华大学镜像源的配置方法,其他镜像源的配置方法类似。
相关推荐
![condarc](https://img-home.csdnimg.cn/images/20210720083646.png)
![tar](https://img-home.csdnimg.cn/images/20210720083646.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)