jupyter notebook的根目录在哪
时间: 2024-04-03 10:30:00 浏览: 168
根据提供的引用内容,可以通过以下两种方法来设置Jupyter Notebook的根目录:
1. 通过Anaconda Prompt生成配置文件并修改[^1]:
- 打开Anaconda Prompt(anaconda3)。
- 运行以下命令生成配置文件:
```shell
jupyter notebook --generate-config
```
- 打开生成的配置文件`jupyter_notebook_config.py`,一般位于`C:\Users\Administrator\.jupyter`目录下。
- 找到并修改以下行:
```python
#c.NotebookApp.notebook_dir = ''
```
将其改为你想要设置的根目录路径,例如:
```python
c.NotebookApp.notebook_dir = 'your path'
```
- 保存修改后的配置文件。
2. 修改配置文件`jupyter_notebook_config.py`:
- 打开`jupyter_notebook_config.py`文件,一般位于`C:\Users\Administrator\.jupyter`目录下。
- 找到并修改以下行:
```python
#c.NotebookApp.notebook_dir = ''
```
将其改为你想要设置的根目录路径,例如:
```python
c.NotebookApp.notebook_dir = 'your path'
```
- 保存修改后的配置文件。
请注意,如果你是通过快捷方式启动Jupyter Notebook而不是命令行启动,根目录的修改可能不会生效。
阅读全文
相关推荐


















