'IPython is not defined' report in JupyterLab

You should probably share a toy example with full code as text at least of something that causes the same issue? Because I have no idea really what you mean 'when I call for ‘packages/matplotlib/pyplot.py’. Always share the code and full traceback as formatted text. See ‘Block code formatting’ here for how to do that here. (You can see the original post here for an example.)

You mention upgrading of your environment. So it was working before?

Is this the other post you mention you saw that was vaguely like yours? If you are not using %matplotlib widget or %matplotlib ipympl or %matplotlib notebook, then it would make sense it isn’t like yours. That post specifically mentioned trying interactive plotting. If you are doing the default inline then it wouldn’t matter but because you don’t supply details (!?!) it is hard to know.