我在树莓派中输入conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/无反应
时间: 2023-07-01 08:23:18 浏览: 126
这可能是因为您的终端正在等待您输入密码,但是密码输入时不会显示出来。请尝试输入您的密码,即使没有看到输入的字符也没有关系,然后按回车键即可执行该命令。如果仍然没有反应,请尝试使用sudo命令以管理员身份运行该命令,例如:sudo 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 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/conda config --append channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/fastai/conda config --append channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/conda config --append channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
### 配置 Conda 添加清华大学镜像源
为了通过 `conda config` 命令添加清华大学镜像的多个 channels,可以按照以下方法操作:
#### 1. 清华大学镜像的主要地址
清华大学提供了 Anaconda 的镜像服务,其主要地址为 `https://mirrors.tuna.tsinghua.edu.cn/anaconda/`。基于此地址,可以通过 `conda config` 命令依次添加所需的 channels。
以下是具体的操作命令列表:
```bash
# 添加 pkgs/free channel
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
# 添加 pkgs/main channel
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
# 添加 conda-forge channel
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
# 添加 fastai channel
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/fastai/
# 添加 pytorch channel
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
# 添加 bioconda channel
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
```
以上每条命令都会向用户的 `.condarc` 文件中追加对应的 channel 地址[^1]。
#### 2. 设置显示 channel URL
为了让每次安装包时都能看到具体的 source address,建议设置如下选项:
```bash
conda config --set show_channel_urls yes
```
这一步会确保在后续使用过程中能够清晰了解所使用的镜像源来自哪个 channel。
#### 3. 创建并激活新的 Conda 环境(可选)
如果需要在一个全新的环境中测试这些配置效果,也可以先创建一个新的环境再执行上述步骤:
```bash
# 创建名为 test_env 的新环境,并指定 Python 版本
conda create -n test_env python=3.8
# 激活该环境
conda activate test_env
```
随后即可在此环境下完成 mirror 的配置工作[^3]。
#### 注意事项
- 如果 Miniconda 或 Anaconda 安装路径不在默认位置,则可能还需要手动调整 PATH 变量以确保命令行工具能找到相关脚本文件[^4]。
- 上述所有更改均会影响全局范围内的 Conda 行为;若仅希望针对特定项目应用特殊 settings,则应考虑利用独立 environments 来隔离影响。
树莓派中输入conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/如何判断成功
您可以在终端中输入以下命令来查看是否成功添加了清华镜像源:
```conda config --show channels```
如果成功添加了清华镜像源,那么您应该能够在显示的通道列表中看到 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/。此外,您可以尝试使用conda命令来安装一些包,如果下载速度较快,则说明已成功使用清华镜像源。
阅读全文
相关推荐

















