【发布时间】:2022-01-22 20:55:30
【问题描述】:
我在 MacOS 上运行 JupyterLab,由于某种原因,在尝试切换虚拟环境时出现以下错误:
bash-3.2$ conda activate yhoo
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.
我可以在 JupyterLab 终端中执行其他 conda 命令,例如 bash-3.2$ conda env list 而不会出错。我能够在 iTerm 的 JupyterLab 终端之外执行 bash-3.2$ conda activate yhoo 而不会出错。因此,这似乎是通过 JupyterLab 运行终端的问题。感谢任何指导。
【问题讨论】:
标签: python-3.x terminal virtualenv conda jupyter-lab