jupyterlab 作为 jupyter 的扩展版本,易用性强,结果保存很合理。突然发现可以添加debugger插件,实现在jupyterlab中调试代码,本文记录方法。
pip install jupyterlab如果不装会报错:
An error occurred installing <code>@jupyterlab/debugger-extension</code>.
Error message:
Please install Node.js and npm before continuing installation. You may be able to install Node.js from your package manager, from conda, or directly from the Node.js website (https://nodejs.org).
wget https://nodejs.org/dist/v14.17.3/node-v14.17.3-linux-x64.tar.xz // 下载
tar xf node-v14.17.3-linux-x64.tar.xz // 解压之后添加环境变量到
/etc/profile或~/.bashrc文件
export PATH=$PATH:/path_to/node-v14.17.3-linux-x64/bin# node -v
v14.17.3
pip install xeus-pythonJupyterLab 2.0+ xeus-python 0.8.0+ notebook 6+

jupyter lab --allow-root --no-browser --ip 0.0.0.0 --port 8080 --notebook-dir /workspace/nfs
installjupyter labextension install @jupyterlab/debugger
