打开jupyter notebook 报错 404GET/static/components/marked/lib/marked.js?

一、问题

在虚拟环境执行jupyter notebook 报错

然后查到有人说要执行:pipinstall --user --ignore-installed jupyter 意思应该是说要重新安装

我按crtl + c退出jupyter notebook

执行上述命令:

pip install--user --ignore-installed jupyter

出现大面积报错:

打开jupyter notebook 报错 404GET/static/components/marked/lib/marked.js?_第1张图片

这感觉把安装的jupyternotebook彻底废了

没办法只能重新安装jupyter notebook

二、解决方法

重新安装了jupyter notebook

1.先卸载jupyternotebook

pip uninstall jupyter notebook
打开jupyter notebook 报错 404GET/static/components/marked/lib/marked.js?_第2张图片

2.重新安装jupyter notebook

我这里制定了版本,因为我想安装代码补全插件,使用别的版本安装这个插件失败,所以使用了这个版本

pip install jupyternotebook==6.4.8
打开jupyter notebook 报错 404GET/static/components/marked/lib/marked.js?_第3张图片

3.安装nbextensions插件

这是个代码补全插件,在jupyter notebook 中可以自动补全代码

pip installjupyter_contrib_nbextensions==0.5.1
打开jupyter notebook 报错 404GET/static/components/marked/lib/marked.js?_第4张图片

这里是因为我之前安装了0.7.0的版本,所以卸载了它

4.激活jupyter_contrib_nbextensions

jupyter contribnbextension install --user
打开jupyter notebook 报错 404GET/static/components/marked/lib/marked.js?_第5张图片

5.安装jupyter_nbextensions_configurator

pip installjupyter_nbextensions_configurator==0.5.0
打开jupyter notebook 报错 404GET/static/components/marked/lib/marked.js?_第6张图片

6.激活jupyter_nbextensions_configurator

jupyternbextensions_configurator enable --user
打开jupyter notebook 报错 404GET/static/components/marked/lib/marked.js?_第7张图片

PS(这里版本变为了jupyter_nbextensions_configurator0.4.1我也不知道原因,但是后面能用,如果有大佬知道原因,希望能够告诉我)

三、测试

执行jupyter notebook 不再报错

打开jupyter notebook 报错 404GET/static/components/marked/lib/marked.js?_第8张图片

打开jupyter notebook 报错 404GET/static/components/marked/lib/marked.js?_第9张图片

jupyter notebook 也多了一个新标签,可以根据需要选择自己想要的功能

测试,出现代码补全功能

可以愉快学习了

你可能感兴趣的:(pycharm等工具,jupyter)