0

I have created a jupyter notebook and created a mybinder from it. The notebook contains an interactive plot (matplotlib), which will update itself while the code is running. The cell looks like this:

%matplotlib notebook
# do some plotting # 

The jupyter notebook itself works fine, the problems only occur when using jupyterlab via mybinder. It will then throw the following error:

Javascript Error: IPython is not defined

Any help is much appreciated!

  • The most wonderful thing about using MyBinder.org is you can share your code with people who can actively use it. If you'd like help, please paste the repo you are launching from. If that repo doesn't have a `launch binder` badge, it's also nice if you include that. At the very least including one of those will help. Right now your post is quite vague. Have you looked at my answer to [Interactive plot with ipyvidgets and matplotlib on binder produces static images](https://stackoverflow.com/a/69182917/8508004)[sic]. – Wayne Nov 12 '21 at 03:37
  • See related post: https://stackoverflow.com/questions/51922480/javascript-error-ipython-is-not-defined-in-jupyterlab – Pierz Jan 11 '22 at 17:54
  • The key thing here was the person was using the JupyterLab interface to work with `.ipynb` files. The top scoring answer about using `ipympl` is what is needed. However, the installation is is easier these days that it will appear at first glance because we are very much beyond JupyterLab 2. – Wayne Feb 10 '23 at 15:31

0 Answers0