康达激活不起作用? [英] Conda activate not working?

查看:11
本文介绍了康达激活不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 gonzo  ~/a/packages  conda env list
# conda environments:
#
ppo_latest               /nohome/jaan/abhishek/anaconda3/envs/ppo_latest
root                  *  /nohome/jaan/abhishek/anaconda3

 gonzo  ~/a/packages  conda activate ppo_latest
 gonzo  ~/a/packages  which python                                                                                     (ppo_latest)
/nohome/jaan/abhishek/anaconda3/bin/python
 gonzo  ~/a/packages  conda deactivate                                                                                 (ppo_latest)
 gonzo  ~/a/packages  which python
/nohome/jaan/abhishek/anaconda3/bin/python

环境在没有错误的情况下被激活.然后我们检查它指的是哪个python.没有变化,为什么?

The environment gets activated without an error. Then we check which python it is referring to it. It is doesn't change, why?

推荐答案

从 conda 4.4 开始,命令

As of conda 4.4, the command

conda activate <envname>

在所有平台上都是相同的.将conda添加到非Windows平台的PATH环境变量的过程(在Windows上你应该使用Anaconda Prompt),以及环境激活过程的变化,conda 4.4.0 的 发行说明 中有详细说明.

is the same on all platforms. The procedure to add conda to the PATH environment variable for non-Windows platforms (on Windows you should use the Anaconda Prompt), as well as the change in environment activation procedure, is detailed in the release notes for conda 4.4.0.

对于低于 4.4 的 conda 版本,命令是任一

For conda versions older than 4.4, command is either

source activate <envname>

在 Linux 和 macOS 上或

on Linux and macOS or

activate <envname>

在 Windows 上.您需要删除 conda.

on Windows. You need to remove the conda.

这篇关于康达激活不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆