conda trouble shooting

2823 단어 condaconda

1. conda 실행 error

  • error
root@aidw-008:/home/aidw/work_han/cate# conda activate base

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


root@aidw-008:/home/aidw/work_han/cate# conda init bash
no change     /home/aidw/opt/anaconda3/condabin/conda
no change     /home/aidw/opt/anaconda3/bin/conda
no change     /home/aidw/opt/anaconda3/bin/conda-env
no change     /home/aidw/opt/anaconda3/bin/activate
no change     /home/aidw/opt/anaconda3/bin/deactivate
no change     /home/aidw/opt/anaconda3/etc/profile.d/conda.sh
no change     /home/aidw/opt/anaconda3/etc/fish/conf.d/conda.fish
no change     /home/aidw/opt/anaconda3/shell/condabin/Conda.psm1
no change     /home/aidw/opt/anaconda3/shell/condabin/conda-hook.ps1
no change     /home/aidw/opt/anaconda3/lib/python3.7/site-packages/xontrib/conda.xsh
no change     /home/aidw/opt/anaconda3/etc/profile.d/conda.csh
modified      /root/.bashrc

==> For changes to take effect, close and re-open your current shell. <==
  • 해결
root@aidw-008:/home/aidw/work_han/cate# eval "$(command conda 'shell.bash' 'hook' 2> /dev/null)"
(base) root@aidw-008:/home/aidw/work_han/cate# conda activate capi
(capi) root@aidw-008:/home/aidw/work_han/cate#

refer

https://stackoverflow.com/questions/55507519/python-activate-conda-env-through-shell-script

좋은 웹페이지 즐겨찾기