2

I'm running VSCode on a Linux machine. In the terminal, my Python version is 3.10.1, with the path /usr/bin/python.
Terminal Output 1

However, in VSCode, it only shows Python 3.9.9, but with the same path. VSCode Select Interpreter

Indeed, VSCode's built-in terminal also uses Python 3.9.9.

I have not yet found a way to fix this, such that Python 3.10.1 is available for use in VSCode.

3
  • Does this answer your question? How can I change the Python version in Visual Studio Code? Commented Jan 22, 2022 at 23:04
  • I didn't find anything on that thread which addressed my issue. In particular, I can select my interpreter with the correct, intended path. But when I do, VSCode (and only VSCode) seems to get 3.9.9 instead of 3.10.1. I suspect this may have something to do with my Flatpak installation of VSCode, but I'm not experienced enough with this to make an informed guess. Commented Jan 22, 2022 at 23:58
  • The problem is that the python that you are using is installed within the isolated env of the flatpak vscode, so it doesn't matter what you have on your system. The latest version of the vscode uses python 3.9.9, and as flatpak uses images to run the application, the only way is to build new image with python 3.10 (haven't tried that before) or wait until new release will have new python version. Commented Feb 20, 2022 at 5:16

2 Answers 2

3

Looks like the issue had to do with installing VSCode via Flatpak. I tried installing from the AUR instead, and it seems to be working as intended now.

Sign up to request clarification or add additional context in comments.

Comments

0

I've been having the exact same problem. Fortunately, as I am currently using Fedora, the easy solution (the only one I've found) was to install the rpm package, as it is officially provided.

That's too bad! Specially because I try to use flatpaks whenever possible.

The only relevant source of information I've found was this discussion in Zorin's forum.

So If anyone in the future comes across this problem and reads this SO question, my advice up to now is (unfortunately) to just try another package format.

1 Comment

As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.