Erik Frisk
Erik Frisk

Reputation: 21

VSCode Python interactive window freezes when using %matplotlib

I have latest version of VSCode and the standard Python extension installed.

I often develop interactively (Shift-Enter) with an interactive Jupyter Window, often including matplotlib and I want the windows externally so I can zoom and resize.

It has worked fine in the past but now I have problems (same problem Mac and Linux). If I

  1. start a Jupyter interactive window
  2. Write %matplotlib (I am using the Qt5Agg backend)
  3. Then, with almost any simple command the interactive window freezes (see attached snapshot).

This works fine with the same set of packages and backends in, e.g., PyCharm. I have attached a snapshot that illustrates my problem image illustrating problem

I hope you have some advice or fix for me, since VSCode is currently not useable for me.

regards, Erik

Upvotes: 1

Views: 1973

Answers (1)

Steven-MSFT
Steven-MSFT

Reputation: 8431

Yeah, it looks like an issue of jupyter notebook, after the version of v2021.10.1001409655 this problem can be found, but if you downgrade to the early version, you will lose the Intellisense.

So, it's suggested to avoid executing %matplotlib in the jupyter notebook for now.

I have submitted an issue on Github.

Upvotes: 2

Related Questions