一.jupyter安装及简单使用
Jupyther notebook(曾经的Ipython notebook),是一个可以把代码、图像、注释、公式和作图集于一处,实现可读性及可视化分析的工具,支持多种编程语言。官方使用手册。安装前,你需要装好python环境,并且安装pip包管理器并更新
pip install --upgrade pip
pip3 install --upgrade pip
1.安装jupyter
Python2
pip install jupyter notebook
(python -m pip install jupyter)
Python3
pip3 install jupyter notebook
(python3 -m pip install jupyter)
2.配置jupyter(可选)
生成jupyter配置文件:
jupyter notebook --generate-config
此时会在你的个人用户目录下的.jupyter 下生成配置文件 jupyter_notebook_config.py,打开以后找到如下一行:
#c.NotebookApp.ip = 'localhost'
这里配置的是是允许访问的IP地址,这里改为*,意思为允许所有ip连接。:
c.NotebookApp.ip = '*'
注:如果你在服务器上运行,需要采用这种方式,并且为了安全考虑,最好将c.NotebookApp.ip的值设置为Client的ip。
3.运行jupyter
运行jupyter的命令为: