jupyter notebook打开后闪退

在命令行中输入jupyter notebook后,命令行闪退,报错如下:

jupyter notebook打开后闪退_第1张图片
jupyter notebook打开后闪退_第2张图片

原因是我之前指定存放jupyter代码的文件夹被我删除了,现在系统找不到这个文件夹,所以才会报错。

解决办法:

首先输入命令jupyter notebook --generate-config,查询配置文件地址,见下图。

在这里插入图片描述
jupyter notebook打开后闪退_第3张图片

使用ctrl+f进行查找

jupyter notebook打开后闪退_第4张图片

在桌面上创建一个文件夹,用于存放之后要编写的代码。并记住它的路径

jupyter notebook打开后闪退_第5张图片

在配置中将我们刚才复制的路径粘贴过来

jupyter notebook打开后闪退_第6张图片

重新启动jupyter notebook,可以发现notebook可以正常运行了。

jupyter notebook打开后闪退_第7张图片

你可能感兴趣的:(Python,jupyter,python)