本文介绍了尽管我有 conda 环境列表,为什么我的 conda activate 不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经在 linux 中使用 conda 创建了自己的环境.当我检查 conda info --envs
时,它给出了一个环境列表,如
I have already created my own environment using conda in linux. When I check conda info --envs
, it gives a list of environment like
# conda environments:
#
base * /home1/sriparna/anaconda3
copy_Env_deepgo /home1/sriparna/anaconda3/envs/copy_Env_deepgo
deepgo_2 /home1/sriparna/anaconda3/envs/deepgo_2
deepgo_3 /home1/sriparna/anaconda3/envs/deepgo_3
enzy /home1/sriparna/anaconda3/envs/enzy
parth /home1/sriparna/anaconda3/envs/parth
protein_struc /home1/sriparna/anaconda3/envs/protein_struc
py2 /home1/sriparna/anaconda3/envs/py2
但我无法激活特定环境.例如当我尝试 conda activate parth
它显示
But I cant activate a particular environment. e.g. when I tried conda activate parth
it shows
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run
$ conda init <SHELL_NAME>
Currently supported shells are:
- bash
- fish
- tcsh
- xonsh
- zsh
- powershell
See 'conda init --help' for more information and options.
IMPORTANT: You may need to close and restart your shell after running 'conda init'.
请帮我解决这个问题.
推荐答案
这对我有用:
source {path_to_anaconda}/anaconda3/etc/profile.d/conda.sh
conda activate parth
这篇关于尽管我有 conda 环境列表,为什么我的 conda activate 不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!