Jupyter notebook 报错 500 : Internal Server Error的解决方法

问题:

         输入jupyter notebook后再浏览器点击.ipynb文件报错500 Internal Server Error,异常如下图所示

 

解决方法:

1). 先卸载jupyter并删除安装目录下的以jupyter开头的文件,再重新pip install jupyter安装jupyter

试验后再打开jupyter notebook, 仍无法正常打开.ipynb文件,报错还是500 Internal Server Error

2). 输入命令python -m ipykernel install --user 安装ipykernel后仍无法正常使用jupyter,报错依旧是500. 

3). 根据参考文献1,判断报错是nbconvert 和pandoc不兼容导致, nbconvert 5.4.1版本解决了该问题(参考文献2),安装nbconvert5.4.1及以后的版本即可。这里输入命令pip install --upgrade --user nbconvert安装nbconvert-5.6.1,也可以使用conda安装,命令为 conda install nbconvert-5.6.1 

安装完nbconvert后再次使用jupyter notebook,在浏览器选择python3终于可以正常打开.ipynb文件了。

 

参考文献:

1. https://stackoverflow.com/questions/55185563/jupyter-notebook-500-internal-server-error

2. https://github.com/conda-forge/nbconvert-feedstock/issues/27

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章