Bri*_*rry 1 virtual-machine azure conda jupyter-notebook azure-machine-learning-service
由于某种原因,我的虚拟机上的 jupyter 笔记本处于错误的环境中(即卡在(base))。此外,我可以更改终端中的环境,但不能更改笔记本中的环境。!conda activate desired_env这是我在笔记本中尝试时发生的情况:
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'.
# conda environments:
#
base * /anaconda
azureml_py36 /anaconda/envs/azureml_py36
azureml_py38 /anaconda/envs/azureml_py38
azureml_py38_pytorch /anaconda/envs/azureml_py38_pytorch
azureml_py38_tensorflow /anaconda/envs/azureml_py38_tensorflow
Run Code Online (Sandbox Code Playgroud)
我在这里尝试了答案(例如,第一次运行!source /anaconda/etc/profile.d/conda.sh)。
source我还尝试使用而不是 'conda activate':激活环境!source /anaconda/envs/desired_env/bin/activate。当我看到当前环境时,它运行但实际上没有做任何事情conda env list
编辑:还补充说,如果我在终端环境中安装包(base),我仍然无法在 jupyter 笔记本中访问它。
小智 6
我是发布 AzureML Notebooks 的 PM,您无法从单元激活 Conda env,您必须为 Conda Env 创建一个新内核。以下是说明:https://learn.microsoft.com/en-us/azure/machine-learning/how-to-access-terminal#add-new-kernels
| 归档时间: |
|
| 查看次数: |
2143 次 |
| 最近记录: |