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

使用conda创建Python3.6环境失败,请求解决方案

Conda创建环境报错解决方案

问题描述

执行以下命令创建Python 3.6环境时出现错误:

conda create --name env_name python=3.6

核心错误信息:

subprocess.CalledProcessError: Command 'lsb_release -a' returned non-zero exit status 1.

已尝试安装requests==2.8.1,问题未解决。

解决方案

  • 修复lsb_release工具
    先手动执行lsb_release -a确认问题:

    • 若系统缺少该工具,根据发行版安装:
      • Debian/Ubuntu:sudo apt install lsb-release
      • RHEL/CentOS:sudo yum install redhat-lsb-core
    • 若工具存在但报错,临时重命名绕过检查:
      sudo mv /usr/bin/lsb_release /usr/bin/lsb_release.bak
      
  • 禁用conda通知功能
    报错触发于拉取渠道通知环节,直接关闭通知:

    conda config --set show_channel_urls False
    conda config --set notify_outdated_conda False
    

    或临时禁用通知执行创建命令:

    conda create --name env_name python=3.6 --no-notices
    
  • 禁用conda插件
    按照报错提示关闭插件运行命令:

    conda --no-plugins create --name env_name python=3.6
    

    或通过环境变量设置:

    CONDA_NO_PLUGINS=true conda create --name env_name python=3.6
    
  • 更新/降级conda版本
    更新conda到最新版:

    conda update -n base conda
    

    若更新无效,降级至稳定版本:

    conda install -n base conda=22.11.1
    
  • 手动设置系统发行版信息
    若lsb_release无法修复,手动指定系统参数:

    conda config --set sys_root /
    conda config --set os_name linux
    conda config --set os_version 5.15.0
    

    (os_version需根据你的实际系统版本调整)

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.04 13:07:10