linux/ubuntu下IPython、IPython Notebook(jupyter)的安装和基本使用

1.如果没有g++,先安装g++:

sudo apt-get install g++

2.安装IPython和IPython Notebook:

sudo pip install IPython

linux/ubuntu下IPython、IPython Notebook(jupyter)的安装和基本使用

sudo pip install urllib3

linux/ubuntu下IPython、IPython Notebook(jupyter)的安装和基本使用

sudo pip install jupyter

linux/ubuntu下IPython、IPython Notebook(jupyter)的安装和基本使用


安装完毕,在终端输入ipython可进入ipython交互环境

linux/ubuntu下IPython、IPython Notebook(jupyter)的安装和基本使用


在终端输入jupyter notebook或ipython notebook浏览器会自动弹出,可在浏览器中使用ipython。点击右侧New菜单栏下的Python2新建一个文件

linux/ubuntu下IPython、IPython Notebook(jupyter)的安装和基本使用


每个框内都可以写一组代码,按shift+enter运行代码

linux/ubuntu下IPython、IPython Notebook(jupyter)的安装和基本使用


在running菜单中,点击对于文档后的shutdown关闭文档

linux/ubuntu下IPython、IPython Notebook(jupyter)的安装和基本使用


如果需要关闭整个jupyter notebook,则在原来的终端中按两次ctrl+c