両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン 次のリビジョン両方とも次のリビジョン |
python:jupyter_notebook [2020/04/16 04:34] – ともやん | python:jupyter_notebook [2021/06/20 12:46] – [Jupyter Notebook - プログラムとその実行結果を再実行可能なドキュメント形式で表現] ともやん |
---|
<html> | ====== Jupyter Notebook - プログラムとその実行結果を再実行可能なドキュメント形式で表現 ====== |
<style> | |
#result pre { | |
overflow: scroll; | |
overflow-x: hidden; | |
font-size: 10px; | |
} | |
#result_long pre { | |
height: 400px; | |
overflow: scroll; | |
overflow-x: hidden; | |
font-size: 10px; | |
} | |
#source_code pre { | |
height: 200px; | |
overflow: scroll; | |
overflow-x: hidden; | |
font-size: 10px; | |
} | |
.dokuwiki .wrap_left { | |
margin-right: 0; | |
} | |
#logo { | |
background-color: white; | |
padding: 0 10px; | |
width: fit-content; | |
} | |
#logo p { | |
margin: 0; | |
} | |
</style> | |
</html> | |
====== Jupyter Notebook ====== | |
<WRAP #logo> | <WRAP #logo> |
{{:python:jupyter-logo.svg?100|Jupyter Logo}} | {{python:jupyter-logo.svg?200|Jupyter Logo}} |
</WRAP> | </WRAP> |
本家: [[https://jupyter.org/|Project Jupyter | Home]]\\ | 本家: [[https://jupyter.org/|Project Jupyter | Home]]\\ |
ソースコード: [[https://github.com/jupyter/notebook|GitHub - jupyter/notebook: Jupyter Interactive Notebook]]\\ | ソースコード: [[https://github.com/jupyter/notebook|GitHub - jupyter/notebook: Jupyter Interactive Notebook]]\\ |
| |
| 本家では [[python:jupyterlab|JupyterLab]]\\ への移行を推奨している。\\ |
| |
===== インストール ===== | ===== インストール ===== |
| |
Python の venv 仮想環境が選択出来るようになる。\\ | Python の venv 仮想環境が選択出来るようになる。\\ |
{{:python:jupyter_notebook_python_venv.png?800|Jupyter Notebook Python venv}}\\ | {{python:jupyter_notebook_python_venv.png?800|Jupyter Notebook Python venv}}\\ |
| |
==== Jupyter Notebook 拡張機能 ==== | ==== Jupyter Notebook 拡張機能 ==== |
| |
**Nbextensions** が追加されるのでクリックする。\\ | **Nbextensions** が追加されるのでクリックする。\\ |
{{:python:jupyter_notebook_nbextensions_001.png?800|Jupyter Nbextensions 001}}\\ | {{python:jupyter_notebook_nbextensions_001.png?800|Jupyter Nbextensions 001}}\\ |
| |
**[v] disable configuration for nbextensions without explicit compatibility (they may break your notebook environment, but can be useful to show for nbextension development)** のチェックを外す。\\ | **[v] disable configuration for nbextensions without explicit compatibility (they may break your notebook environment, but can be useful to show for nbextension development)** のチェックを外す。\\ |
{{:python:jupyter_notebook_nbextensions_002.png?800|Jupyter Nbextensions 002}}\\ | {{python:jupyter_notebook_nbextensions_002.png?800|Jupyter Nbextensions 002}}\\ |
| |
=== Hinterland (入力補完) を有効にする === | === Hinterland (入力補完) を有効にする === |
**[v] Hinterland** にチェックを入れる。\\ | **[v] Hinterland** にチェックを入れる。\\ |
{{:python:jupyter_notebook_nbextensions_003.png?800|Jupyter Nbextensions Hinterland}}\\ | {{python:jupyter_notebook_nbextensions_003.png?800|Jupyter Nbextensions Hinterland}}\\ |
| |
Notebook を起動すると入力補完が有効になっている。\\ | Notebook を起動すると入力補完が有効になっている。\\ |
{{:python:jupyter_notebook_autocomplete.png?800|Jupyter Notebook Autocomplete}}\\ | {{python:jupyter_notebook_autocomplete.png?800|Jupyter Notebook Autocomplete}}\\ |
| |
| ===== トラブルシューティング ===== |
| |
| ==== Bad config encountered during initialization エラーが発生する ==== |
| <code> |
| $ jupyter notebook |
| </code> |
| <WRAP prewrap 100% #result> |
| <code powershell> |
| [C 12:43:20.989 NotebookApp] Bad config encountered during initialization: The 'kernel_spec_manager_class' trait of <notebook.notebookapp.NotebookApp object at 0x000001F187312C40> instance must be a type, but 'environment_kernels.EnvironmentKernelSpecManager' could not be imported |
| </code> |
| </WRAP> |
| |
===== 参考文献 ===== | ===== 参考文献 ===== |
[[https://github.com/ipython/ipykernel|GitHub - ipython/ipykernel: IPython Kernel for Jupyter]]\\ | [[git>ipython/ipykernel|GitHub - ipython/ipykernel: IPython Kernel for Jupyter]]\\ |
[[https://qiita.com/takuyanin/items/8bf396e7b6b051670147|【Jupyter Notebook】効果的な使い方を知ろう[Python/機械学習] - Qiita]]\\ | [[qita>takuyanin/items/8bf396e7b6b051670147|【Jupyter Notebook】効果的な使い方を知ろう[Python/機械学習] - Qiita]]\\ |
[[https://qiita.com/simonritchie/items/d7dccb798f0b9c8b1ec5|Jupyter 知っておくと少し便利なTIPS集 - Qiita]]\\ | [[qita>simonritchie/items/d7dccb798f0b9c8b1ec5|Jupyter 知っておくと少し便利なTIPS集 - Qiita]]\\ |
[[http://pynote.hatenablog.com/entry/jupyter-notebook-nbextensions|Jupyter Notebook - おすすめの nbextensions まとめ - Pynote]]\\ | [[http://pynote.hatenablog.com/entry/jupyter-notebook-nbextensions|Jupyter Notebook - おすすめの nbextensions まとめ - Pynote]]\\ |
[[https://qiita.com/ishida330/items/53f1b0df2247fab5c6dd|Jupyter/Pythonでデータ分析する人にお勧めしたい!便利なライブラリー「PixieDust」をザクッと紹介します - Qiita]]\\ | [[qita>ishida330/items/53f1b0df2247fab5c6dd|Jupyter/Pythonでデータ分析する人にお勧めしたい!便利なライブラリー「PixieDust」をザクッと紹介します - Qiita]]\\ |
[[https://ohke.hateblo.jp/entry/2019/05/25/180000|Jupyter NotebookをAPI経由で操作する - け日記]]\\ | [[https://ohke.hateblo.jp/entry/2019/05/25/180000|Jupyter NotebookをAPI経由で操作する - け日記]]\\ |
| [[https://blog.jupyter.org/how-we-made-jupyter-notebooks-collaborative-with-yjs-b8dff6a9d8af|How we made Jupyter Notebooks collaborative with Yjs | by Kevin Jahns | Jun, 2021 | Jupyter Blog]]\\ |
| |