我无法使用我的Jupyter笔记本/ Jupyter实验室,它是空白的

时间:2019-03-14 13:09:08

标签: python jupyter-notebook

安装Anaconda后,在终端机中输入“ jupyter笔记本”(Windows)  cmd page 然后其他页面仅显示几秒钟,然后重定向到空白页面。

browser first page

browser second page

和控制台显示:

Refused to execute script from '<URL>' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.
VM27 tree:1 Refused to execute script from 'http://localhost:8888/static/components/es6-promise/promise.min.js?v=f004a16…' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.
VM27 tree:1 Refused to execute script from 'http://localhost:8888/static/components/preact/index.js?v=00a2fac…' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.
VM27 tree:1 Refused to execute script from 'http://localhost:8888/static/components/proptypes/index.js?v=c40890e…' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.
VM27 tree:1 Refused to execute script from 'http://localhost:8888/static/components/preact-compat/index.js?v=aea8f66…' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.
VM27 tree:1 Refused to execute script from 'http://localhost:8888/static/components/requirejs/require.js?v=951f856…' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.
VM27 tree:1 Refused to execute script from 'http://localhost:8888/static/tree/js/main.min.js?v=ab9f3a6…' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.
VM27 tree:24 Uncaught ReferenceError: require is not defined
    at VM27 tree:24

全部空白!而且我也无法理解控制台信息。 我不确定问题是否与安装tensorflow-gpu有关。 我尝试重新安装Anaconda。 我尝试配置Windows Defender,并将“ jupyter-notebook.exe”和“ jupyter-lab.exe”放入白名单。 我尝试至少使用其他种类的浏览器。 但是问题仍然存在。 所以任何人都有相似性问题并成功解决,请告诉我。

3 个答案:

答案 0 :(得分:1)

这是由于jupyter中存在一个错误,您可以安装并使用较旧的版本,直到该错误得到解决为止。

https://github.com/jupyter/help/issues/537

答案 1 :(得分:0)

笔记本5.7.6是原因。

user11230962是正确的。在他的评论为我指明了正确的方向之前,我已经进行了很长一段时间。麻烦的模块和版本是notebook 5.7.6

4个小时前(2019年3月28日中部时间上午10点)推出了一个新版本-我没有找到任何更改日志。我确实尝试过,但没有成功。但这可能是一个缓存问题。因为以下内容无法立即生效。我不得不关闭所有打开的选项卡,然后重试。然后成功。

TLDR

具体运行此程序,一切就很好了,

py -3 -m pip uninstall -y notebook
py -3 -m pip install -Iv notebook==5.7.5
# or
py -3 -m pip install -Iv notebook==5.7.5 --force-reinstall

更多

或者根据您的选择,删除笔记本并重新安装notebook==5.7.5。我没有亲自尝试第二个命令,但是它应该可以工作。注意,这是我在Windows上运行pip的方式,有多个py版本-如果您在安装时启用了该选项,则我会使用py.exe,该路径在路径上,我认为它是python 2.7(但一个或另一个)。调整命令的前部以调整操作方式。

编辑:我重新访问了5.7.7,它可以解决问题。

您也可以更新以解决该问题。所以它更简单

py -3 -m pip install -U notebook

应该在一个命令中起作用。我怀疑更新后需要重新启动浏览器。

答案 2 :(得分:0)

我终于解决了这个问题,原因是我最后一次卸载以前的Anaconda,但没有更改笔记本内核的路径,我认为内核已损坏。 (我在安装当前的Anaconda时更改了其他路径) 所以我删除了以前的笔记本内核并安装了新的内核,现在它可以工作了〜