matplotlib / matplotlib/ipympl

ipympl when jupyter and ipython kernel are in different conda environment

オープン
#34 コメント 10 件 リアクション 6 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Jupyter Notebook
スター
1.7k
フォーク
234
PR マージ指標
30日以内にマージされた PR はありません

説明

Hi,

Some context

I typically install the jupter notebook in a conda environment, and create a shortcut on the desktop to launch jupyter-notebook.exe (windows 10 64 bits). Then I create an ipython kernel with all dependencies I want to work with in an other environment, and I register this kernel-in-a-conda-environment with the command

ipython kernel install --user --name NameOfMyNewKernel

I find this workflow relatively clean because I can chose when I want to update either my kernel (bleeding edge or very old depending on this situation) independently from the notebook itself.

The problem

As far as I understand ipympl is really 2 packages.

  • One is a python package called ipympl that must be installed together with your ipython kernel, because you need to write import ipympl in your notebook.
  • The other one is a javascript package (I supposed it is called also ipympl) that must be installed together with the jupyter notebook application. I don't know if the python package is required or not. You also need to make sure that the javascript package is registered as an extension (jupyter nbextension enable --py --sys-prefix ipympl) by jupyter.

If this is documented somewhere it is well hidden ;-)

The workaround

I installed 2 times the ipympl package, one in my kernel environment, the other in the jpuyter environment. For the latter case, because the python package is also shipped in the ipympl conda package, matplotlib is installed but I think that is useless. With this, everyting works, I am able to see interactive plots in my notebook.

Before figuring out that I needed to install ipympl in the jupyter environment, I received weird error messages without really explaining what the problem was.

Proposal

  1. Document the problem. I suppose that this repository README coud explain this, but I suppose it should be also documented somewhere in matplotlib and/or jupyter documentation. I must admit I find the jupyter documentation really hard to navigate though.
  2. Split ipympl conda package in two: one that contains the python package and the other one containing the javascript package.

Thanks

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、リポジトリのREADMEと、issueで言及されているconda、Jupyter kernel、nbextensionのドキュメント化されたコマンドを確認します。ipymplのどの部分がkernel環境に属し、どの部分がJupyter環境に属するのかを明確にし、必要なセットアップと失敗時の症状を文書化します。また、condaパッケージを分割することが実現可能かどうかも評価します。分離された環境を使うワークフローが明確に説明されていれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
jupyter-notebook
領域
documentation, tooling
issue の種類
ドキュメント
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。