pkg_resources.ContextualVersionConflict: (notebook 5.2.2 (/usr/lib/python3/dist-packages), Requirement.parse('notebook>=5.5.0'), {'rise'}) への対処
なにが起こったか
- jupyterでreveal.jsを使える
RISEというのがあるらしいので入れて動かしてみようとした - 最近のRISEは
jupyter-nbextension install rise --py --sys-prefixをする必要がないらしい
Note:
Before RISE 5.4.2, it was necessary to perform one more step to install the JS and CSS in the proper places with
jupyter-nbextension install rise --py --sys-prefix
This is not needed anymore because those resources are installed automatically by the setup.py when you pip install the package.
- jupyterの起動後、スライド用のボタンがないため、色々調べたところ、裏で動いている
jupyter-nbextension install rise --py --sys-prefixがエラーを吐いているらしい。
解決法
RISEのバージョンを下げる
$ pip3 uninstall RISE
$ pip3 install RISE==5.4.1
$ sudo jupyter-nbextension install rise --py --sys-prefix
$ sudo jupyter-nbextension enable rise --py --sys-prefix
余談
- sudoでやらないとpermissionErrorになるのでsudoするとpipでいれたjupyterが動かないのはなんで?
- aptで入れたjupyterなら動いた