如何解决conda激活命令错误:CommandNotFoundError?

时间:2019-04-25 04:00:40

标签: linux bash anaconda

我正在登录远程服务器并尝试通过anaconda3安装软件,但是使用conda activate命令时会引发错误消息。

下面是我输入的cli。

$ module load anaconda3
$ conda create --prefix /home/yourBridgesUsername/anaconda3 --clone base
$ conda activate /home/slank/anaconda3

第三个命令在下面抛出错误。

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'. If your shell is Bash or a Bourne variant, enable conda for the current user with

$ echo ". /opt/packages/anaconda/anaconda3-5.2.0/etc/profile.d/conda.sh" >> ~/.bashrc

<sudo commands I am not allowed to use>

... put the base environment on PATH permanently, run echo "conda activate" >> ~/.bashrc

Previous to conda 4.4, the recommended way to activate conda was to modify PATH in your ~/.bashrc file. You should manually remove the line that looks like

export PATH="/opt/packages/anaconda/anaconda3-5.2.0/bin:$PATH"

我几次尝试了上述所有方法,并检查〜/ .bashrc以确保更改生效,而确实如此。

我在包括anaconda的bin目录在内的各种目录中尝试了conda / activate / source / activate的各种组合。我找不到在线解决方案。

0 个答案:

没有答案