赞
踩
记录下自己的安装步骤
1. 安装ipython, jupyter
pip install ipython
pip install jupyter
[root@50eb5057baac /]# jupyter notebook --generate-config
Writing default config to: /root/.jupyter/jupyter_notebook_config.py
root@50eb5057baac /]# ipython
Python 3.5.1 (default, Oct 21 2016, 21:37:19)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help.
In [1]: from notebook.auth import passwd
In [2]: passwd()
Enter password:
Verify password:
Out[2]: 'sha1:43b95b731276:5d330ee6f6054613b3ab4cc59c5048ff7c70f549'
In [3]:
vi /root/.jupyter/jupyter_notebook_config.py
<ol start="1" style="box-sizing: border-box; padding: 0px; list-style-position: initial; list-style-image: initial; border-top: none; border-right: 1px solid rgb(231, 229, 220); border-bottom: none; border-left: none; border-image: initial; color: rgb(92, 92, 92); font-family: Consolas, "Courier New", Courier, mono, serif; margin: 0px 0px 1px 45px !important;"><li class="alt" style="box-sizing: border-box; margin-left: 40px; list-style: decimal; border-top: none; border-right: none; border-bottom: none; border-left: 3px solid rgb(108, 226, 108); border-image: initial; color: inherit; line-height: 18px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="box-sizing: border-box; margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;"><span style="box-sizing: border-box; margin: 0px; padding: 0px; border: none; background-color: inherit;">c.NotebookApp.ip='*' #设置访问notebook的ip,*表示所有IP,这里设置ip为都可访问 </span></span></li><li style="box-sizing: border-box; margin-left: 40px; list-style: decimal; border-top: none; border-right: none; border-bottom: none; border-left: 3px solid rgb(108, 226, 108); border-image: initial; background-color: rgb(248, 248, 248); line-height: 18px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="box-sizing: border-box; margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">c.NotebookApp.password = u'sha1:5df252f58b7f:bf65d53125bb36c085162b3780377f66d73972d1' #填写刚刚生成的密文 </span></li><li class="alt" style="box-sizing: border-box; margin-left: 40px; list-style: decimal; border-top: none; border-right: none; border-bottom: none; border-left: 3px solid rgb(108, 226, 108); border-image: initial; color: inherit; line-height: 18px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="box-sizing: border-box; margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">c.NotebookApp.open_browser = False # 禁止notebook启动时自动打开浏览器(在linux服务器一般都是ssh命令行访问,没有图形界面的。所以,启动也没啥用) </span></li><li style="box-sizing: border-box; margin-left: 40px; list-style: decimal; border-top: none; border-right: none; border-bottom: none; border-left: 3px solid rgb(108, 226, 108); border-image: initial; background-color: rgb(248, 248, 248); line-height: 18px; margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; padding: 0px 3px 0px 10px !important;"><span style="box-sizing: border-box; margin: 0px; padding: 0px; border: none; color: black; background-color: inherit;">c.NotebookApp.port =8889 #指定访问的端口,默认是8888。 </span></li></ol>
[root@346086094cbe /]# jupyter notebook --allow-root
[W 17:17:04.106 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended.
[I 17:17:04.111 NotebookApp] Serving notebooks from local directory: /
[I 17:17:04.112 NotebookApp] 0 active kernels
[I 17:17:04.112 NotebookApp] The Jupyter Notebook is running at:
[I 17:17:04.112 NotebookApp] http://[all ip addresses on your system]:8889/
[I 17:17:04.112 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
5. 然后你就可以在浏览器里敲入你的地址 http://yourip:8889/, 看到如下界面。
安装成功
6. 启动Jupyter的开发窗口,点击右上角的new 按钮
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。