This is an old revision of the document!
Jupyter Notebook是以网页的形式打开,可以在网页页面中直接编写代码和运行代码,代码的运行结果也会直接在代码块下显示。如在编程过程中需要编写说明文档,可在同一个页面中直接编写,便于作及时的说明和解释。
小白用户(并且磁盘剩余空间超过3G)推荐通过Anaconda安装,Anaconda包括Jupyter以及其他科学计算相关包。
Python高级用户可以使用Pip安装,安装包名称是jupyter
jupyter notebook # 指定端口 jupyter notebook --port <port_number> # 不自动打开浏览器 jupyter notebook --no-browser
详见:远程访问服务器Jupyter Notebook的两种方法
jupyter notebook --generate-config
终端输入ipython
,设置你自己的jupyter访问密码,注意复制输出的sha1:xxxxxxxx密码串:
In [1]: from notebook.auth import passwd In [2]: passwd() Enter password: Verify password: Out[2]: 'sha1:xxxxxxxxxxxxxxxxx'
c.NotebookApp.ip='*' c.NotebookApp.password = u'sha:ce...刚才复制的那个密文' c.NotebookApp.open_browser = False c.NotebookApp.port =8888 #可自行指定一个端口, 访问时使用该端口
随后启动jupyter即可在同一网络中的任意电脑浏览器访问