-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Javascript Error: IPython is not defined #7115
Comments
This documentation: %matplotlib notebook |
Looks like it says the magic is supported in the classic notebook but not in JupyterLab though? Notebook 7 is based on JupyterLab and reuses the notebook component from JupyterLab. Which is likely the reason why you get this error. The classic notebook used to provide JavaScript globals like |
If you're saying this issue belongs in matplotlib then I can move it. I would nevertheless ask if there's a more clear error message that could be raised. |
In this case the fix would probably be to use |
That's right, it's another application (Notebook 7). And the classic notebook refers to Notebook < 7. |
Yes, we can look into using different magic(s). The problem is that we have a lot of notebooks which use
Ok, this point wasn't known to me. If this is the case, we can ask matplotlib to clarify their documentation? It sounds like you're saying this is likely a |
Update the matplotlib documentation to mention that Notebook 7 behaves like JupyterLab would indeed be useful 👍 There is an issue to discuss adding a compatibility layer with some classic notebook globals: #6394. Although for now there is no such thing available and not sure there will be. So for now this would indeed be a "won't fix" unless someone volunteers to implement #6394 (or similar). |
Just a quick note according to my colleagues: |
👆 For any other novices like myself encountering the IPython is not defined problem when using notebook v7, this is the solution. Change the line that says |
God bless you |
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:
I get the error:
Reproduce
conda create python=3.11 -n mynb
pip install jupyter notebook matplotlib
Expected behavior
If I downgrade
pip install "notebook<7"
then a plot appears (with no error message)Context
Troubleshoot Output
Command Line Output
Browser Output
The text was updated successfully, but these errors were encountered: