Jupyter_contrib_nbextensions: jupyter subcommand 'contrib' not availible if jupyter_contrib_nbextensions installed as user

Created on 21 Jan 2017  路  4Comments  路  Source: ipython-contrib/jupyter_contrib_nbextensions

If jupyter_contrib_nbextensions is installed as user with

pip install --user jupyter_contrib_nbextensions

The second step failed when calling

$ jupyter contrib nbextension install --user                                                      
jupyter: 'contrib' is not a Jupyter command

You can workaround this by directly calling the application

python .local/lib/python3.6/site-packages/jupyter_contrib_core/application.py nbextension install --user

I don't know if this can be easily fix, but adding a note to the docs could be nice.

I'm under Arch Linux and I didn't test on other distributions.

Most helpful comment

You're right. The script is in ~/.local/bin. I will add this to my $PATH.
Thank you.

All 4 comments

So, this presumably occurs because wherever scripts for per-user installs go, they're not on the path that the main jupyter command searches through (it will look for executables name jupyter-contrib, or on windows jupyter-contrib.exe). As a result, I think fixing it would require patching jupyter_core rather than here. Good idea to add it to docs though, they can always use additions! Feel free to PR something :)

Also, to clarify, pip install --user is not directly analogous to the various nbextension install --user commands (which is annoyingly subtle, but I'm afraid I think here to stay. It's perfectly possible to use an nbextension install --user from a non-user pip package

In your case @JGobeil it looks like the script should end up being installed into ~/.local/bin, so if that's on your (shell) path, it should all work ok...

You're right. The script is in ~/.local/bin. I will add this to my $PATH.
Thank you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

michaelaye picture michaelaye  路  7Comments

Hgh2017 picture Hgh2017  路  3Comments

vinniec picture vinniec  路  7Comments

skabbe picture skabbe  路  6Comments

ggrrll picture ggrrll  路  7Comments