1. 安装
① 安装前提
安装Jupyter Notebook的前提是需要安装了Python(3.3版本及以上,或2.7版本)。
使用pip命令安装
如果你是有经验的Python玩家,想要尝试用pip命令来安装Jupyter Notebook,那么请看以下步骤吧!接下来的命令都输入在终端当中的噢!
把pip升级到最新版本
Python 3.x
pip3 install --upgrade pip
Python 2.x
pip install --upgrade pip
注意:老版本的pip在安装Jupyter Notebook过程中或面临依赖项无法同步安装的问题。因此强烈建议先把pip升级到最新版本。安装Jupyter Notebook
Python 3.x
pip3 install jupyter
启动
① 默认端口启动
在终端中输入以下命令:
jupyter notebook
执行命令之后,在终端中将会显示一系列notebook的服务器信息,同时浏览器将会自动启动Jupyter Notebook。
启动过程中终端显示内容如下:
$ jupyter notebook
[I 08:58:24.417 NotebookApp] Serving notebooks from local directory: /Users/catherine
[I 08:58:24.417 NotebookApp] 0 active kernels
[I 08:58:24.417 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/
[I 08:58:24.417 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).