ipympl
can be a but tricky to install well and get all the changes propagated as there’s many layers it affects. Make sure to do a hard refresh in the browser window on the page you are trying to use to run code employing it.
Have you tried multiple browsers on the computer that it doesn’t work on?
You aren’t clear at all though on what happens when you try to run code using it? And that code provided is incomplete. I wouldn’t expect anything to happen with it. Please share what happens with a minimal reproducible example you can share. There should be examples among code here and Stackoverflow. Or go here press ‘launch binder
’ and when the session starts scroll down about a third of the way. There’s examples using it there, too.
Oh wait, is the title what happens when you try to use it? It would be best to be clear about all this.
If that is the case then I’d ask how are you running pip list
. Are you using the magic %pip list
in a cell in the notebook? That is the one that will tell you what is actually present in the environment backing the kernel.
And if it is still being a problem, you may want to try & go ahead and try adding a new cell above the one where you want to use ipympl
and then run the magic %pip install ipympl
. Then refresh the kernel but don’t try running the code yet. Shutdown everything on the machine. The browser, the entire machine and restart it. Then when you open the notebook again, do a hard page refresh on the notebook page in the browser. JupyterLab should refresh the entire page. Give it time. Then restart the kernel and only now try code that uses ipympl
.
Tip: Although %matplotlib widget
is supported to allow legacy code to work, it is best to use %matplotlib ipympl
as that is more explicit and actually what is being used. That way you and others will know ipympl
is involved.