无法激活conda环境保护

2024-04-19 16:23:55 发布

您现在位置:Python中文网/ 问答频道 /正文

我经常使用Anaconda来管理Windows机器上的python包。但我很难理解它在Ubuntu上的工作原理,可能是因为我对Linux还不熟悉。在

我下载了anacondalinux安装程序(python3)并运行bash ~/Downloads/Anaconda3-5.2.0-Linux-x86_64.sh进行安装。安装之后,我能够在终端中输入anaconda-navigator来启动GUI,在这里我创建了一个名为tensorflow_env的新Python3.6环境。但我无法在终端激活它。我跟着错误信息打字

echo ". /home/chris/anaconda3/etc/profile.d/conda.sh" >> ~/.bashrc 在终端中,这解决了问题。在

为了验证,下面是我的终端现在的样子: enter image description here

作为Windows中的一个经常使用Anaconda的用户,我不明白的是当我从GUI中的绿色三角形中点击open terminal(见下面的屏幕截图), enter image description here

打开的conda终端仍然显示bash: activate: No such file or directory。如果我测试Python,您可以看到它甚至不是python3。 enter image description here

导航器怎么了?它仍然不能激活环境。在


Tags: bash机器终端环境ubuntulinuxwindowsdownloads