Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can I fix the Python REPL in VS Code with Python 3.13?

I’m having trouble sending code in Python file to the interactive REPL in VS Code (using Shift + Enter).

Single line code and functions with one line work fine, but any code chunks with multiple lines raise IndentationErrors. Also KeyboardInterrupt shows up in the REPL every time code is sent.

Tried updating and restarting VS Code and the Python Extension.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel


Python 3.13 REPL

  • VS Code Version: 1.95.2 (Universal), configured to use 4 spaces instead of tabs
  • Python Extension from Microsoft: v2024.20.0
  • Python: 3.13.0 (venv)
  • MacOS Sonoma 14.2.1

>Solution :

It’s a known issue:

https://github.com/microsoft/vscode-python/issues/24256

Yes, that KeyboardInterrupt is handled via #24422

So you give it a try tomorrow (it just got merged today Nov 12), and it wont be there!

So apparently it will be fixed in the next vscode-python build (v2024.20.0 is currently the latest).

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading