使用centos linux vps搭建jupyter notebook踩坑日记

今天我尝试用vps搭建在线jupyter notebook网站时遇到了这样一个问题:

[W 21:48:07.243 NotebookApp] SSL Error on 9 ('171.115.101.73', 49731): [SSL: HTTP_REQUEST] http request (_ssl.c:1129)

使用centos linux vps搭建jupyter notebook踩坑日记

 

 访问域名时无法打开页面,经过debug之后发现是在修改jupyter_notebook_config.py这个配置文件时出现的问题,原因在于我添加了ssl证书,希望它能够支持https://然而就是这两行代码导致网页无法运行。

解决方法:将这两行代码注释掉,便恢复到之前可用的版本。

使用centos linux vps搭建jupyter notebook踩坑日记

  后续思路:jupyter lab应该更加支持ssl,不要再尝试给notebook添加ssl了,我花费了6个小时研究这个问题,还没有结果,如果有人成功,请给我留言!

 还有一个坑,就是如果警告提示你,以后的版本要把NotebookApp改成ServerApp【config.py里面】,这个不要管,改了网站照样运行不了,我今天后期网站访问不了的主要原因就是①SSL证书②ServerApp

使用centos linux vps搭建jupyter notebook踩坑日记

 

 使用centos linux vps搭建jupyter notebook踩坑日记

 

 一定要是NotebookApp!

 

最后提供下我今天参考的几个教程:

Linux下如何退出vim的一些常用命令总结 - King-DA - 博客园 (cnblogs.com)

VPS上搭建Python3+Jupyter Notebook - 知乎 (zhihu.com)

用 VPS 搭建你自己的在线 Jupyter Notebook - 简书 (jianshu.com)

(17条消息) CentOS7 部署Jupyter_积木i的博客-CSDN博客_centos7安装jupyter

Linux 中安装jupyter notebook - 知乎 (zhihu.com)

发表评论

相关文章