如何在Jupyter Lab中打开调试器按钮 [英] How to turn on the debugger button in Jupyter Lab

查看:250
本文介绍了如何在Jupyter Lab中打开调试器按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用jupyter实验室并尝试将 debugger 嵌入其中.

I am using jupyter lab and trying to embedd the debugger in it.

Windows 10,64位

这是我遵循的步骤:

conda create --name ml python=3.8.2
conda activate ml
conda install xeus-python notebook jupyterlab -c conda-forge

jupyter labextension install @jupyterlab/debugger

然后我启动 jupyter lab ,它会在Google Chrome浏览器中打开:

Then I start jupyter lab and it opens in Google Chrome:

尽管我在 xpython 笔记本中获得了调试器按钮,但无法将其打开.这是屏幕截图.

Though I get the debugger button in xpython notebook but I am not able to turn it on. Here is the screenshot.

有人可以帮忙打开调试器吗?

Can someone help how to turn on the debugger??

推荐答案

需要具有支持调试功能的内核才能使用调试器.当前xeus-python是这样的内核,但是默认的IPython内核也将很快支持调试器.

A kernel with support for debugging is required to be able to use the debugger. Currently xeus-python is such a kernel, but the default IPython kernel will support the debugger soon too.

通常建议创建一个新的conda环境以安装依赖项:

It is generally recommended to create a new conda environment to install the dependencies:

conda create -n jupyterlab-debugger -c conda-forge xeus-python notebook jupyterlab

conda activate jupyterlab-debugger

如果运行旧版本的JupyterLab(2.x),您还需要安装 nodejs 来手动安装扩展名(请注意,它是从JupyterLab 3.x起预安装的,因此您无需如果使用最新的JupyterLab,则需要运行以下命令):

If running an old version of JupyterLab (2.x) you will also need to install nodejs to install the extension manually (note that it comes-preinstalled since JupyterLab 3.x so you do not need to run the commands below if using up-to date JupyterLab):

conda install nodejs
jupyter labextension install @jupyterlab/debugger

这篇关于如何在Jupyter Lab中打开调试器按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆