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/