1. 程式人生 > >Running as root is not recommended. Use --allow-root to bypass

Running as root is not recommended. Use --allow-root to bypass

首先輸入,檢視配置檔案位置

[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