Recently, I had to upgrade my Jupyter Notebook and Python. After upgrading I encounter an issue with using built-in magic functions such as %matplotlib notebook or %matplotlib inline. At this moment I tried to downgrade it and use the older jupyter version but it does not help.
Do we have any solutions for this?
My Jupyter version is 7.1.3
Pyhton – 3.11.7
Error while viewing a graph.
10
What issue did you come up with? Can you post the error or output if it has given any?
Guillermo Ripa is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2
%matplotlib notebook
isn’t for current JupyterLab or Jupyter Notebook 7+. Jupyter Notebook 7+ uses a lot of the same tech as JupyterLab and so you want to look for things that work with that. In place of %matplotlib notebook
with current JupyterLab or Jupyter Notebook 7+, you generally want to install and use ipympl. Note that you have to install ipympl
in your environment. This is very important.
Then following installation, %matplotlib ipympl
will work much like %matplotlib notebook
did with the older tech. See documentation here where it says:
“To activate the
ipympl
backend all you need to do is include the%matplotlib ipympl
magic in the notebook.”
Finally, if you prefer the older way you can continue to use NbClassic at this time, see here.