【问题标题】:Changing the default Jupyter configuration directory更改默认 Jupyter 配置目录
【发布时间】:2020-08-07 04:50:00
【问题描述】:

我从 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

【问题讨论】:

    标签: python virtualenv jupyter jupyter-lab


    【解决方案1】:

    将以下行添加到 .zshrc 更改 jupyter(和 ipython)配置目录:

    export IPYTHONDIR=~/.config/ipython
    export JUPYTER_CONFIG_DIR=~/.config/jupyter
    

    【讨论】:

      猜你喜欢
      • 2016-11-29
      • 2020-04-25
      • 2014-05-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多