You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Linux aarch64架构下创建Conda环境遇CondaHTTPError求助

解决Linux aarch64下Miniconda创建Python2.7环境的CondaHTTPError问题

首先明确:不需要创建profile.h文件,你的问题核心是网络连接或conda源配置问题,以下是具体解决步骤:

1. 排查基础网络连通性

先测试能否访问官方源地址,执行命令:

curl -I https://repo.anaconda.com/pkgs/main/linux-aarch64/current_repodata.json

如果返回无法连接/超时,说明网络无法访问Anaconda官方源,优先检查:

  • 防火墙/代理拦截:确认是否有公司/校园防火墙限制了Anaconda域名访问
  • 网络稳定性:尝试切换网络(如手机热点)重试

2. 替换为国内适配aarch64的conda源

Python2.7已停止官方支持,且aarch64架构的官方源包可能不全或访问不畅,建议替换国内镜像源:

  • 编辑或新建conda配置文件~/.condarc,内容替换为:
channels:
  - defaults
show_channel_urls: true
default_channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
  conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  • 清理conda缓存:
conda clean -i
  • 再次尝试创建环境:
conda create --name env1 python=2.7

3. Python2.7适配补充

Python2.7已停止维护,部分aarch64源可能无完整包,若上述步骤失败:

  • 尝试指定conda-forge源创建:
conda create --name env1 python=2.7 -c conda-forge
  • 确认Miniconda版本:过新的Miniconda可能不再兼容Python2.7,可下载适配Python2.7的旧版Miniconda(针对aarch64架构)

4. 代理配置检查

若网络需代理,确保conda正确配置:

conda config --set proxy_servers.http http://你的代理地址:端口
conda config --set proxy_servers.https https://你的代理地址:端口

无需代理则清空配置:

conda config --remove-key proxy_servers.http
conda config --remove-key proxy_servers.https

内容的提问来源于stack exchange,提问作者Susan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.22 22:18:09