【发布时间】:2021-06-28 01:59:30
【问题描述】:
我通常从 Git Bash 打开 Jupyter Lab,使用命令
jupyter lab
但今天它突然在与平时不同的文件夹中打开 wrong folder in Lab 我也从 Git Bash 检查了打开 Jupyter Notebook,它在通常的文件夹中打开。 right, usual folder in Notebook
我检查了“jupyter_notebook_config.py”。并且它们都映射到同一个目录
# c.LabApp.notebook_dir = ''
# c.NotebookApp.notebook_dir = ''
但是,我发现这些行适用于 Lab,但不适用于 Notebook
## The app directory to launch JupyterLab from.
# Default: 'C:\\Users\\myuser\\Anaconda3\\share\\jupyter\\lab'
# c.LabApp.app_dir = 'C:\\Users\\myuser\\Anaconda3\\share\\jupyter\\lab'
有人可能知道为什么 jupyter lab 在错误的文件夹中打开? 我已经检查了这些
- How to change the Jupyter start-up folder
- How to navigate to a different directory in Jupyter Notebook?
另外,从 Git Bash 打开
$ jupyter notebook --notebook-dir 'C:\\Users\\myuser\\Desktop\\'
但是这个打不开
$ jupyter notebook --notebook-dir 'C:\\Users\\myuser\\Desktop\\MyWork'
Jupyter Lab 看不到 MyWork 文件夹,这是一个 GitHub 主存储库,这可能是相关的吗? see side to side, File Explorer vs Jupyter Lab
【问题讨论】:
-
您使用的是 JupyterLab 3.0 吗?如果是,则不再使用 jupyter_notebook_config.py 而是 jupyter_server_config.py ,请参阅stackoverflow.com/a/66860252/6646912
-
安装的版本是2.2.6,是公司电脑=没有管理员权限
标签: path jupyter config git-bash jupyter-lab