【现象】

在命令行输入python出现“Warning:This Python interpreter is in a conda environment, but the environment has not been activated. Libraries may fail to load. To activate this environment please see https://conda.io/activation”

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

在命令行输入python出现“Warning:This Python interpreter is in a conda environment, but the environment has not been activated. Libraries may fail to load. To activate this environment please see https://conda. 随笔 第1张

 

【解决方法】

  1、确定当前环境

  使用终端或Anaconda提示符执行以下步骤。

  默认情况下,活动环境---您当前使用的环境---显示在命令提示符开头的括号()或括号[]中:(myenv) $

  如果您没有看到这个,请运行:conda info --envs

  在显示的环境列表中,当前环境以星号(*)突出显示。

  在命令行输入python出现“Warning:This Python interpreter is in a conda environment, but the environment has not been activated. Libraries may fail to load. To activate this environment please see https://conda. 随笔 第2张

  2、激活环境

  conda activate myenv

  在命令行输入python出现“Warning:This Python interpreter is in a conda environment, but the environment has not been activated. Libraries may fail to load. To activate this environment please see https://conda. 随笔 第3张

 

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄