r/learnpython • • Sep 14 '26

vscode sporadically freezing

hi mates. when my script becomes lengthy (for instance 85 lines) vscode stops executing commands. i suspect whether i downloaded it properly. anyways. i close then open vscode as a workaround but i started to need a permanent fix. i am a computer noob (well... more like average joe on the street). so please no higher computer registry in the responses. thanks in advance.

0 Upvotes

9 comments sorted by

View all comments

Show parent comment

0

u/[deleted] Sep 14 '26

[deleted] — view deleted comment

1

u/Basic_Background_70 Sep 14 '26

shouldnt be any errors here. as to how i run them. either by clickin run cell (or run above rarely) or focusing on the chunk then ctrl + shift.

2

u/coolnameright Sep 14 '26 • Bravo

So you mean that you are running these in a Jupyter notebook? If that's the case, there is actually a bug that I ran into recently that could be the same. I found it's with the new version of jupyters ipykernal.

https://github.com/microsoft/vscode-jupyter/issues/17228?timeline_page=1

Downgrading the version fixed it for me. Try running the below in your terminal and then restart it

pip install "ipykernel<7"