美文网首页
Your shell has not been properly

Your shell has not been properly

作者: vicLeo | 来源:发表于2020-02-10 11:15 被阅读0次

conda的路径要正确写入.bashrc, 不然下一次会报错conda : command no found

lchen@Vostro-5460:~$ echo 'export PATH="/home/lchen/miniconda3/bin:$PATH"' >> ~/.bashrc
lchen@Vostro-5460:~$ source ~/.bashrc
lchen@Vostro-5460:~$ conda activate rna

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'.


lchen@Vostro-5460:~$ source activate
(base) lchen@Vostro-5460:~$ conda activate rna
(rna) lchen@Vostro-5460:~$

出现此报错的原因是因为之前的虚拟环境没有退出source deactivate

良好习惯:

启用conda进入虚拟环境:
lchen@Vostro-5460:~$ source activate
(base) lchen@Vostro-5460:~$ conda activate rna
(rna) lchen@Vostro-5460:~$ 
用完conda后退出虚拟环境:
source deactivate

参考: [Tz.]conda激活环境失败,Your shell has not been properly configured to use 'conda activate'.

相关文章

网友评论

      本文标题:Your shell has not been properly

      本文链接:https://www.haomeiwen.com/subject/gyxaxhtx.html