简体   繁体   English

VSCode:如何修复 Python 扩展版本 Python 2 兼容性并防止自动升级?

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

I have a legacy code using Python 2. The last version of VSCode Python extension that supports Python 2 is v2022.2.1924087327我有一个使用 Python 2 的遗留代码。支持 Python 2 的 VSCode Python 扩展的最新版本是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.我的问题是 VSCode 总是自动更新扩展。 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.由于我在远程机器上使用它,当我失去连接时,它会自动更新扩展,我必须手动降级它,重新加载 window 并重新启动它。

Is it possible to fiz the version of my Python extension in VSCode?是否可以在 VSCode 中修复我的 Python 扩展的版本?

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.如果有人发现如何仅针对 Python 扩展禁用自动更新,我会将其标记为正确答案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM