On Visual code, It takes to download python through the Microsoft store
If my understanding is correct, Windows comes with dummy python executables python.exe
and python3.exe
that take you to the microsoft store to install it- after which it is a real python executable instead of a dummy one. If you run where python
, you'll get a list of all the python executables that are found via the PATH
variable in the order that they are found in the PATH
, where one of them will be the Windows one (instead of the one you installed from the Python website). Likely, the one you'll see listed first will be C:\Users\you\AppDate\Local\Microsoft\WindowsApps\python.exe
.
What you probably need to do is update the order of entries in your PATH
environment variable so that the directory containing the one you installed from the Python website is earlier in the PATH
environment variable than the directory of the out-of-box Windows one.
Note: As indicated in this question: why must python executable path be added to system PATH environment variables for python command to work in visual studio code, you might need to add the directory containing your from-website Python to the system PATH
environment variable (before/above the path to the directory of the system one) (as opposed to the user PATH
environment variable).
Or, you may be able to remove those dummy executables in your Windows "App Executable Alias" settings (as shown in this answer).