jupyter不在默认目录之外运行代码

时间:2018-11-29 13:24:39

标签: jupyter-notebook jupyter

我启动jupyter,它会转到默认目录c:/ users / gary,并且可以正确加载并运行ipynb文件。

当我浏览到另一个目录时。我可以加载ipynb文件,但是当我尝试运行该文件时却无法运行,但出现错误:

ImportError: cannot import name 'escape' from 'html' 
(C:\Users\gary\Documents\pythonscripts\html.py)
[W 16:35:23.027 NotebookApp] KernelRestarter: restart failed
[W 16:35:23.027 NotebookApp] Kernel 0d40f433-dd0f-475a-af0b-a5214fc9980c 
died, removing from map.
[W 16:36:08.042 NotebookApp] Timeout waiting for kernel_info reply from 
0d40f433-dd0f-475a-af0b-a5214fc9980c
[E 16:36:08.044 NotebookApp] Error opening stream: HTTP 404: Not Found 
(Kernel does not exist: 0d40f433-dd0f-475a-af0b-a5214fc9980c)

更新了错误

1 个答案:

答案 0 :(得分:0)

我认为您需要从Jupyter的“文件”菜单中“从默认目录启动Jupyter”和“加载”笔记本。