我现在有3个环境:

[abigail@localhost anaconda3]$ conda info --envs
# conda environments:
#
mlearing                 /home/abigail/anaconda3/envs/mlearing
mlearning2               /home/abigail/anaconda3/envs/mlearning2
root                  *  /home/abigail/anaconda3


我想切换到env'mlearing':

[abigail@localhost anaconda3]$ source envs/mlearing/bin/activate
(root) [abigail@localhost anaconda3]$ conda info --envs


但看起来它仍然坚持根环境:

(root) [abigail@localhost anaconda3]$ conda info --envs
# conda environments:
#
mlearing                 /home/abigail/anaconda3/envs/mlearing
mlearning2               /home/abigail/anaconda3/envs/mlearning2
root                  *  /home/abigail/anaconda3


如何切换到其他环境?

最佳答案

你有没有尝试过?

conda activate envname

关于python - 激活Anaconda3中的环境,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/40903955/

10-12 18:14