jupyter notebook的安装配置
1,pip安装
2,ipython安装
yum install python-devel
pip install ipython
3,jupyter notebook安装配置
1)安装
pip install jupyter notebook
2)关闭防火墙
systemctl stop firewalld && systemctl disable firewalld
3)配置
直接运行jupyter notebook时提示:[C 17:13:12.857 NotebookApp] Running as root is not recommended. Use --allow-root to bypass.
创建密码:
生成并修改notebook配置文件jupyter_notebook_config.py
jupyter notebook --generate-config --allow-config
根据路径找到jupyter_notebook_config.py修改其中配置如下
c.NotebookApp.allow_root = True (运行root启动)
c.NotebookApp.ip = '0.0.0.0' (允许远程访问)
c.NotebookApp.notebook_dir = u'/opt/jupyter' (路径需创建)
c.NotebookApp.password = u'sha1:247e645c2c5f:baa35a8dfaf16be68cf76b69edfcf5e956cdf245'(密码跟事先设置的一致)
4)测试
输入jupyter notebook提示[W 17:27:29.233 NotebookApp] No web browser found: could not locate runnable browser.(我的linux本身无图形界面)
使用jupyter notebook --no-browser --ip=0.0.0.0即可访问
外部浏览器输入对应地址即可访问
本文参照https://www.cnblogs.com/heitaoq/p/8527980.html