Jupyther notebook(曾经的Ipython notebook),是一个能够把代码、图像、注释、公式和做图集于一处,实现可读性及可视化分析的工具,支持多种编程语言。官方使用手册。html
安装前,你须要装好python环境,而且安装pip包管理器。node
pip install --upgrade pip sudo pip install jupyter notebook
或者python
python -m pip install jupyter
pip3 install --upgrade pip sudo pip3 install jupyter notebook
或者git
python3 -m pip install jupyter
jupyter notebook
或者github
ipython notebook
ipython profile create
此时会在你的家目录生成配置文件.ipython/profile_default/ipython_kernel_config.py
编程
直接在该文件的头部添加代码浏览器
c = get_config() c.InteractiveShell.ast_node_interactivity = "all"
vi ~/.ipython/ipythonrc
bash
readline_parse_and_bind "\M-i": " " readline_parse_and_bind "\M-o": "\d\d\d\d" readline_parse_and_bind "\M-I": "\d\d\d\d
注释掉这3行markdown
须要设置中文字体,不然中文会乱码。编程语言
import matplotlib.pyplot as plt plt.rc('font', family='Microsoft YaHei Mono', size=12)
https://www.zybuluo.com/hanxiaoyang/note/534296
https://zhuanlan.zhihu.com/p/26739300?group_id=843868091631955968
http://www.javashuo.com/article/p-dwctrukh-bz.html
https://www.zhihu.com/question/59392251
http://www.jianshu.com/p/2f3be7781451 Anaconda使用总结
JupyterLab是Jupyter Notebook的加强版本,看起来更像是一个IDE。
pip install jupyterlab
若是你使用的Jupyter版本早于5.3,那么你还须要运行如下命令来启动JupyterLab服务组件。
jupyter serverextension enable --py jupyterlab --sys-prefix
使用如下命令运行JupyterLab:
jupyter lab
JupyterLab 会在自动在浏览器中打开. See our documentation for additional details.
查看令牌
jupyter notebook list
输出
http://localhost:8888/?token=c8de56fa... :: /Users/you/notebooks
您能够经过运行如下命令列出当前安装的扩展:
jupyter labextension list
经过运行如下命令卸载扩展:
jupyter labextension uninstall my-extension
其中my-extension
是扩展名列表中的打印名称。您也能够使用此命令卸载核心扩展(之后能够随时从新安装核心扩展)。
https://jupyterlab.readthedocs.io/en/latest/user/extensions.html
https://github.com/jupyterlab/jupyterlab#getting-help
https://gitter.im/jupyterlab/jupyterlab
http://jupyterlab.github.io/jupyterlab/