我正在尝试更新木星笔记本的JUPYTER_PATH。我在jupyter文档之后设置了环境变量,但仍然是jupyter contrib nbextension install --user,例如,安装在C:\Users\username\AppData\nbextensions下而不是C:\somedir\AppData\Roaming\jupyter\nbextensions下。
将这些添加到我的环境变量中。
JUPYTER_CONFIG_DIR=C:\somedir\.jupyter
JUPYTER_PATH=C:\somedir\AppData\Roaming\jupyter
JUPYTER_RUNTIME_DIR=C:\somedir\AppData\Roaming\jupyterjupyter --path显示
PS C:\somedir\> jupyter --path
config:
C:\somedir\.jupyter
C:\anaconda\python27\win64\431\etc\jupyter
C:\ProgramData\jupyter
data:
C:\somedir\AppData\Roaming\jupyter
C:\Users\username\AppData\Roaming\jupyter
C:\anaconda\python27\win64\431\share\jupyter
C:\ProgramData\jupyter
runtime:
C:\somedir\AppData\Roaming\jupyterjupyter --data-dir显示
jupyter --data-dir
C:\Users\username\AppData\Roaming\jupyter我认为C:\Users\username\AppData\Roaming\jupyter需要删除,但也不能确定如何删除。你能帮忙吗?
发布于 2017-12-07 16:09:26
要设置用户数据目录,应该使用JUPYTER_DATA_DIR环境变量,在您的情况下设置为C:\somedir\AppData\Roaming\jupyter。您还可以取消设置JUPYTER_PATH (详见下文)。
虽然从文档中可以看出,nbextensions命令没有注意到JUPYTER_PATH环境变量,因为它不使用jupyter_core.paths.jupyter_path函数,而是直接使用jupyter_core.paths.jupyter_data_dir来构造用户数据nbextensions目录。
来自jupyter --paths输出的数据部分的条目jupyter --paths是用户数据目录,因为JUPYTER_PATH是在其他条目之外使用的,而不是替换任何条目。为了您的目的,我建议您取消设置JUPYTER_PATH,因为没有它您可以得到想要的东西。
https://stackoverflow.com/questions/47660483
复制相似问题