Skip to content

Javascript Error: IPython is not defined #7115

Closed

Description

I'm not sure what the correct repo is to report this... I picked here because downgrading to notebook<7 fixes the issue.

Description

If I use this in a notebook cell:

import matplotlib.pyplot as plt
import numpy as np

%matplotlib notebook
plt.plot(np.arange(5))

I get the error:

Javascript Error: IPython is not defined
image

Reproduce

  1. conda create python=3.11 -n mynb
  2. pip install jupyter notebook matplotlib
  3. make new jupyter notebook with the above cell

Expected behavior

If I downgrade pip install "notebook<7" then a plot appears (with no error message)

Context

  • Operating System and version: windows 11
  • Browser and version: Chrome
  • Jupyter Notebook version:
$ jupyter --version
Selected Jupyter core packages...
IPython          : 8.16.1
ipykernel        : 6.25.2
ipywidgets       : 8.1.1
jupyter_client   : 7.4.9
jupyter_core     : 5.4.0
jupyter_server   : 2.8.0
jupyterlab       : 4.0.7
nbclient         : 0.8.0
nbconvert        : 7.9.2
nbformat         : 5.9.2
notebook         : 7.0.6
qtconsole        : 5.4.4
traitlets        : 5.11.2
Troubleshoot Output
Paste the output from running `jupyter troubleshoot` from the command line here.
You may want to sanitize the paths in the output.
Command Line Output
Paste the output from your command line running `jupyter notebook` here, use `--debug` if possible.
Browser Output
Paste the output from your browser Javascript console here, if applicable.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions