Reputation: 842
I am new to Jupyter notebooks and I wanted to have a tool for automatic autocompletion of the code and to have a variable explorer like in Spyder. I found 2 Stackoverflow pages (Autocompletion in Juypter, Variable Explorer in Jupyter) recommending to use the jupyter_contrib_nbextensions.
I did exactly what is written in those posts for Anaconda and I could install the 'jupyter_contrib_nbextensions'. I also installed the 'hinterland' and 'varInspector' extension and I can see the extensions in Jupyter notebooks and activated them (see screenshot). However, I just can't use it. Somehow nothing has changed when I code in Pupyter. Do I have to activate somehting further?
One problem that comes up during activation using the terminal of Anaconda is that I get an message that I do not understand. You can see that in the screenshot. Maybe this has something to do with my difficulties using those extension (but maybe not) .
Does anyone have an idea what I have to do in order to use those extensions? I'd appreciate every comment and would be quite thankful for your help.
Do I have to somehow activate it at another position (e.g. directly in the notebook)? Any ideas what the warnings/error messages in the cmd mean?
Reminder on bounty: As I have not received a solution for my answer and my bounty is soon to expire, I'd like to remind you on this quesiton. Does anybody have (further) ideas what the problem might be and how to tackle it? I'd highly appreciate any further idea.
Upvotes: 1
Views: 2191
Reputation: 1090
It's possible something is messed up in your environment so I would recommend starting afresh in a new environment with a recent version of python (I don't know what version you're using) and start off with just one extension. The below works for me on mac/linux:
conda create -n testenv python=3.8
conda activate testenv
pip install notebook jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
jupyter nbextension enable hinterland/hinterland
You may need to do this in 'Anaconda Prompt' rather than the regular Windows terminal. Finally run jupyter notebook
of course to launch the server and create a new notebook to test everything works. If it still isn't working, something else must be really messed up with your environment or it's a bug on windows in which case open an issue.
Upvotes: 3
Reputation: 513
Try these:
$ pip install nb_xxx_extension
$ jupyter nb_xxx_extension enable --sys-prefix
You could use conda
to install if the extension is available. Otherwise just install pip
in your conda env and install as above.
Upvotes: 2