更改默认的 Jupyter 配置目录
Changing the default Jupyter configuration directory
我从 python 3 虚拟环境开始 jupyter-lab
。在执行 jupyter --config-dir
时,我可以看到 /Users/myusername/.jupyter
我已经编辑了位于上述目录中的文件 jupyter_notebook_config.py
,以更改用户配置目录的默认位置:c.LabApp.user_settings_dir
从 /Users/myusername/.jupyter/lab/user-settings
到 /Users/myusername/.config/jupyter/lab/user-settings
保持我的主目录干净。
但是当我再次执行 jupyter --config-dir
时,我看不到变化。我也试过停用和重新激活 python 虚拟环境。
如何更改 jupyter --config-dir
使其输出 /Users/myusername/.config/jupyter
而不是 /Users/myusername/.jupyter
?
将以下行添加到 .zshrc
更改 jupyter(和 ipython)配置目录:
export IPYTHONDIR=~/.config/ipython
export JUPYTER_CONFIG_DIR=~/.config/jupyter
我从 python 3 虚拟环境开始 jupyter-lab
。在执行 jupyter --config-dir
时,我可以看到 /Users/myusername/.jupyter
我已经编辑了位于上述目录中的文件 jupyter_notebook_config.py
,以更改用户配置目录的默认位置:c.LabApp.user_settings_dir
从 /Users/myusername/.jupyter/lab/user-settings
到 /Users/myusername/.config/jupyter/lab/user-settings
保持我的主目录干净。
但是当我再次执行 jupyter --config-dir
时,我看不到变化。我也试过停用和重新激活 python 虚拟环境。
如何更改 jupyter --config-dir
使其输出 /Users/myusername/.config/jupyter
而不是 /Users/myusername/.jupyter
?
将以下行添加到 .zshrc
更改 jupyter(和 ipython)配置目录:
export IPYTHONDIR=~/.config/ipython
export JUPYTER_CONFIG_DIR=~/.config/jupyter