1.试图 Jupyter Lab 进行 Debug
conda install -c conda-forge jupyterlab
# conda install xeus-python -c conda-forge # 会有问题
pip install -i https://mirrors.aliyun.com/pypi/simple xeus-python
pip install nodejs npm # 安装 Node.js
jupyter labextension install @jupyterlab/debugger # 安装JupyterLab 前端插件
jupyter lab # cmd 运行
想在jupyter中使用 Debug功能,网络说jupyter lab可以。安装之后,问题多多,最后连jupyter notebook也不能用。没事不要安装 upyter lab。比如出现 jupyter 500 : Internal Server Error 这样的错误。
pip uninstall or conda uninstall 无法彻底删除jupyter lab。解决方案如下:
进入 C:\Users\admin\anaconda3\envs\mypy38\Lib\site-packages 中删除所有的jupyter开头的文件夹;删除文件夹 C:\Users\admin\.jupyter。
重新安装 conda install jupyter 回归到原始的jupyter notebook。
2. 使用VSCode
直接使用Vscode可以调试,但是Vscode不支持matplotlib.notebook, 当前(2024-1-12)只支持 matplotlib.inline、 matplotlib.widget
3. 最终方案 Pycharm的专业版。
Pycharm的专业版可以直接调试Jupyter。
本文讲述了作者在尝试在JupyterLab中使用Debug功能时遇到的问题,包括安装过程中的错误、pip和conda卸载不彻底,以及推荐使用VSCode(不支持matplotlib.notebook)和PyCharm专业版作为替代方案。最终,PyCharm的专业版因其对Jupyter的支持成为最佳选择。
1057

被折叠的 条评论
为什么被折叠?



