如何在Google计算引擎(深度学习VM)的conda环境中运行jupyter实验室? [英] How to run jupyter lab in a conda environment on a google compute engine (Deep Learning VM)?
问题描述
-
我在深度学习VM 中创建了一个conda环境. SSH(在VM实例页面中单击实例的SSH按钮)并键入
source activate <environment_name>
时,它将在外壳中正确激活.
I made a conda environment in my Deep Learning VM. When I ssh to it (clicking SSH button of my instance in the VM instances page) and type
source activate <environment_name>
it gets activated correctly in the shell.
我已成功从本地计算机连接到jupyter实验室,如文档
I successfully connect to jupyter lab from my local machine as explained from the docs
如何在此VM上的特定conda环境中使用jupyter?
在特定的conda环境中运行jupyter的接受的方式似乎是
The accepted way to run jupyter in a specific conda environment seems to be
在运行jupyter Notebook之前,请使用
source activate <environment_name>
在终端中激活conda环境.
Activate a conda environment in your terminal using
source activate <environment_name>
before you run jupyter notebook.
但深度学习VM文档说
初始化您的深度学习VM实例后,将启动Jupyter Lab会话
A Jupyter Lab session is started when your Deep Learning VM instance is initialized
这样,在创建jupyter实验会话之前,我无法进行源激活.
so that I cannot source activate before the creation of the jupyter lab session.
有什么想法吗?
- 我自己运行标准的jupyter笔记本,而不使用VM提供的jupyter实验室?
- 在创建jupyter实验室之前在VM的启动脚本中激活环境?
推荐答案
请尝试以下步骤:
-
源激活< env_name>
conda安装ipykernel
ipython内核安装--name< env_name> --user
此后,从 hub.colfaxresearch.com 启动python代码,然后选择内核- ->更改内核->< env_name>
After this, launch your python code from hub.colfaxresearch.com and select Kernel --> Change Kernel --> < env_name >
这篇关于如何在Google计算引擎(深度学习VM)的conda环境中运行jupyter实验室?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!