VSCode: How to fix Python extension version for Python 2 compatibility and prevent automatic upgrade?

1.1k views Asked by At

I have a legacy code using Python 2. The last version of VSCode Python extension that supports Python 2 is v2022.2.1924087327

It is very easy to change the extension to an older version.

My problem is that VSCode always automatically updates the extension. Since I'm using it in a remote machine, when I loose connection, it automatically updates the extension, and I must manually downgrade it, reload the window and start it again.

Is it possible to fiz the version of my Python extension in VSCode?

1

There are 1 answers

0
neves On BEST ANSWER

I've just found how to prevent extensions to automatically upgrade.

And I just set:

{
  "extensions.autoUpdate": false
}

It will now ask me for each extension upgrade, it is an annoyance, but at least I can control it.

If someone finds how to disable auto update just for the Python extension, I'll mark it as the correct answer.