reference: https://blog.csdn.net/weixin_39777626/article/details/80371659
首先输入,查看配置文件位置
[as-pc as]# jupyter notebook --generate-config --allow-root
Overwrite /root/.jupyter/jupyter_notebook_config.py with default config? [y/N]y
Writing default config to: /root/.jupyter/jupyter_notebook_config.py
接下来打开配置文件
gedit /root/.jupyter/jupyter_notebook_config.py
找到这一行
#c.NotebookApp.allow_root = False
去掉#,并修改成True即可解决root权限运行的问题
c.NotebookApp.allow_root =True
保存,重新运行程序
jupyter notebook