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.

kaki gadol
  • 1,116
  • 1
  • 14
  • 34
Sharp104
  • 41
  • 3
  • Does this answer your question? [How can I change the Python version in Visual Studio Code?](https://stackoverflow.com/questions/48135624/how-can-i-change-the-python-version-in-visual-studio-code) – Tomerikoo Jan 22 '22 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. – Sharp104 Jan 22 '22 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. – anonymous Feb 20 '22 at 05:16

2 Answers2

2

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.

Sharp104
  • 41
  • 3
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.

igrvlhlb
  • 33
  • 3
  • 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](/help/how-to-answer). – Community Feb 10 '22 at 08:53