Jupyter启动页面空白

简介

想装Facebook的Prophet,先得装Pystan,Anaconda装完自动升Python3.7了。

整个环境也崩了,重装Anaconda后,启动Jupyter,包括Notebook和Lab,浏览器的页面都是空白的。

尝试过把Chrome加入Jupyter的设置里面,还是不起作用。

最后,在issue中找到解决办法。

修改注册表

Chrome Console错误信息:

1
2
3
Refused to execute script from '<http://localhost:8888/lab/static/vendors~main.10079ad9676c70f28097.js>' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.

Refused to execute script from '<http://localhost:8888/lab/static/main.13de647526d0a582493b.js>' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.

这个问题只在Windows上出现。这是由于在Windows注册表中为javascript文件设置了错误的MIME类型。通过使用正确的内容类型编辑Windows注册表来解决此问题:

1
regedit->HKEY_LOCAL_MACHINE\Software\Classes

将看到每个文件扩展名的大量文件夹,只需向下滚动到.js注册表并选择它,在右侧,如果Content Type值不是application/javascript,则右键单击Content Type并将值更改为application / javascript

一分一毛,也是心意。