Conda激活无法正常工作? [英] Conda activate not working?

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

问题描述

 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>

在所有平台上都是相同的.对于非Windows平台,将conda添加到PATH环境变量的过程(在Windows上,您应该使用Anaconda Prompt),以及环境激活过程的更改,在

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.

这篇关于Conda激活无法正常工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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