差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
| python:jupyter_notebook [2019/08/08 17:11] – ともやん | python:jupyter_notebook [2021/06/20 12:48] (現在) – [参考文献] ともやん | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| - | <ifauth !@loggedinusers><html> | + | ====== Jupyter Notebook - プログラムとその実行結果を再実行可能なドキュメント形式で表現 ====== |
| - | <script async src="//pagead2.googlesyndication.com/pagead/ | + | <WRAP #logo> |
| - | < | + | {{python: |
| - | | + | </WRAP> |
| - | | + | 本家: [[https://jupyter.org/|Project Jupyter |
| - | enable_page_level_ads: true | + | ソースコード: [[https://github.com/jupyter/ |
| - | }); | + | |
| - | </script>< | + | <wrap em>本家では [[python: |
| - | < | + | |
| - | < | + | |
| - | #result pre { | + | |
| - | height: 200px; | + | |
| - | overflow: scroll; | + | |
| - | overflow-x: hidden; | + | |
| - | } | + | |
| - | </style> | + | |
| - | </html> | + | |
| - | ====== Jupyter Notebook ====== | + | |
| ===== インストール ===== | ===== インストール ===== | ||
| 行 29: | 行 19: | ||
| > pip install jupyter ipykernel | > pip install jupyter ipykernel | ||
| </ | </ | ||
| - | <WRAP prewrap 100% #result> | + | <WRAP prewrap 100% #result_long> |
| < | < | ||
| Collecting jupyter | Collecting jupyter | ||
| 行 196: | 行 186: | ||
| **%HOMEPATH%\.jupyter\jupyter_notebook_config.py** を生成する。\\ | **%HOMEPATH%\.jupyter\jupyter_notebook_config.py** を生成する。\\ | ||
| + | <WRAP prewrap 100%> | ||
| < | < | ||
| (jupyter) > jupyter notebook --generate-config | (jupyter) > jupyter notebook --generate-config | ||
| Writing default config to: C: | Writing default config to: C: | ||
| </ | </ | ||
| + | </ | ||
| **%HOMEPATH%\.jupyter\jupyter_notebook_config.py** を編集する。\\ | **%HOMEPATH%\.jupyter\jupyter_notebook_config.py** を編集する。\\ | ||
| + | <WRAP prewrap 100%> | ||
| <code python> | <code python> | ||
| # Configuration file for jupyter-notebook. | # Configuration file for jupyter-notebook. | ||
| 行 210: | 行 203: | ||
| c.EnvironmentKernelSpecManager.display_name_template = " | c.EnvironmentKernelSpecManager.display_name_template = " | ||
| </ | </ | ||
| + | </ | ||
| Jupyter Notebook を実行する。\\ | Jupyter Notebook を実行する。\\ | ||
| 行 235: | 行 229: | ||
| Python の venv 仮想環境が選択出来るようになる。\\ | Python の venv 仮想環境が選択出来るようになる。\\ | ||
| - | {{:python: | + | {{python: |
| ==== Jupyter Notebook 拡張機能 ==== | ==== Jupyter Notebook 拡張機能 ==== | ||
| 行 242: | 行 236: | ||
| (jupyter) > pip install jupyter-contrib-nbextensions jupyter-nbextensions-configurator | (jupyter) > pip install jupyter-contrib-nbextensions jupyter-nbextensions-configurator | ||
| </ | </ | ||
| - | <WRAP prewrap 100% #result> | + | <WRAP prewrap 100% #result_long> |
| < | < | ||
| Collecting jupyter-contrib-nbextensions | Collecting jupyter-contrib-nbextensions | ||
| 行 313: | 行 307: | ||
| > jupyter contrib nbextension install --user | > jupyter contrib nbextension install --user | ||
| </ | </ | ||
| - | <WRAP prewrap 100% #result> | + | <WRAP prewrap 100% #result_long> |
| < | < | ||
| [I 10:25:56 InstallContribNbextensionsApp] jupyter contrib nbextension install --user | [I 10:25:56 InstallContribNbextensionsApp] jupyter contrib nbextension install --user | ||
| 行 1053: | 行 1047: | ||
| **Nbextensions** が追加されるのでクリックする。\\ | **Nbextensions** が追加されるのでクリックする。\\ | ||
| - | {{:python: | + | {{python: |
| **[v] disable configuration for nbextensions without explicit compatibility (they may break your notebook environment, | **[v] disable configuration for nbextensions without explicit compatibility (they may break your notebook environment, | ||
| - | {{:python: | + | {{python: |
| === Hinterland (入力補完) を有効にする === | === Hinterland (入力補完) を有効にする === | ||
| **[v] Hinterland** にチェックを入れる。\\ | **[v] Hinterland** にチェックを入れる。\\ | ||
| - | {{:python: | + | {{python: |
| Notebook を起動すると入力補完が有効になっている。\\ | Notebook を起動すると入力補完が有効になっている。\\ | ||
| - | {{:python: | + | {{python: |
| + | |||
| + | ===== トラブルシューティング ===== | ||
| + | |||
| + | ==== Bad config encountered during initialization エラーが発生する ==== | ||
| + | < | ||
| + | $ jupyter notebook | ||
| + | </ | ||
| + | <WRAP prewrap 100% # | ||
| + | <code powershell> | ||
| + | [C 12: | ||
| + | </ | ||
| + | </ | ||
| ===== 参考文献 ===== | ===== 参考文献 ===== | ||
| - | [[https:// | + | [[git>ipython/ |
| - | [[https:// | + | [[qita>takuyanin/ |
| - | [[https:// | + | [[qita>simonritchie/ |
| [[http:// | [[http:// | ||
| + | [[qita> | ||
| + | [[https:// | ||
| + | [[https:// | ||
| + | [[https:// | ||