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

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

1、首先查看配置文件位置,输入:# jupyter notebook --generate-config --allow-root
在这里插入图片描述
2、接下来打开配置文件:# gedit /root/.jupyter/jupyter_notebook_config.py
在这里插入图片描述
3、找到"#c.NotebookApp.allow_root = False ";去掉#,并修改成True即可解决root权限运行的问题

		c.NotebookApp.allow_root =True
		保存,重新运行程序:	# jupyter notebook

4、设置访问密码
打开 ipython 输入

	from notebook.auth import passwd
	passwd()

	然后根据提示输入2次密码
	Enter password: ········
	Verify password: ········

在这里插入图片描述
5、复制密码,粘贴至配置文件(记得去掉 #)

	c.NotebookApp.password = u'sha1:f5*****************************'

6、更多设置:
c.NotebookApp.ip = ‘localhost’
c.NotebookApp.open_browser = True(True:启动时自动打开浏览器,False:需手动打开浏览器访问http://localhost:8888/tree)
c.NotebookApp.port = 8888(端口设置)

  • 3
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值