python - Jupyterlab: Directory keeps redirecting to where jupyter_notebook_config.py is
问题描述
I am using Windows Subsystem-Linux (WSL-Ubuntu) on Windows.
I have installed jupyterlab on WSL using Miniconda under a separate virtual environment for my own development.
I am using VSCode to access WSL through the built-in terminal.
However, it is a known issue that the current redirect URL does not work when being redirected from WSL.
To resolve the issue of the inability to redirect to nbserver html, I changed c.NotebookApp.notebook_dir = False.
However, it caused my jupyter notebook to always start my current directory (despite being in a different directory) to where jupyter_notebook_config.py is, even when I deleted it.
There is no way to somehow change this error until I reinstall it (including jupyter notebook and core) completely.
The second time it happened was also when I generated the config file to change the Browser value on the config to use the Chrome installed on my original system.
Using jupyter notebook or reinstalling in a different virtual environment also does not work..
Please help and Thanks in advance!!
解决方案
所以我发现了根本问题.. 有时当您关闭 VScode(WSL 扩展)上的代码或终端时,您的 jupyter 实验室/笔记本可能不会总是停止在 localhost 端口上运行,因此会导致您被重定向到默认值您的配置所在的位置。
即使您在终端上使用 Crtl-C 来阻止服务器运行,也会发生这种情况......
因此,只需运行:
jupyter notebook stop 8888
确保所有恶意服务器都可以使用 8888 端口,然后重新运行
jupyter lab / notebook
无需重新安装 jupyter 等!
推荐阅读
- reactjs - ReactJS 和 DraftJS,如何动态更改字体大小?
- eclipse - 如何将 SciPy 正确导入 PyDev?
- c - 编程中的嵌套循环
- flutter - 如何为 ListTile 实现一个 onTap 方法,该方法在被点击时从 ListView 中移除?
- html - 在另一个包含不同表单的 cgi 脚本中使用表单值
- node.js - 无法通过 mongo compass 创建数据库
- python - 在 Django 中创建自定义 FileField 数据类型
- php - add-apt-repository ondrej/php 用于旧的 ubuntu 版本 (14) 和 php 7.0
- python - 如何在pyspark的一列上应用窗口函数?
- c++ - 在 Slot 中传递多个参数