I recently installed Python 3.7.9 for a class I am taking. I am able to run python code both through the windows command prompt and Visual Studio 2019. I was making sure everything was set up correctly. However, when i run the command python --version, it just enters a blank line. IS there something im supposed to do after installing python to set up my Command Prompt?
Asked
Active
Viewed 6,921 times
1 Answers
2
VS code pulls from the specified file path for each python version, so it will work regardless of if python has been added to your PATH.
Does it give you an error when you just type python
into your CMD (not inside vs code)?
If it does then you need to add python to your PATH, details for this can be found here:How to add a folder to `Path` environment variable in Windows 10 (with screenshots)
and the folder paths you need are:
%USERPROFILE%\AppData\Local\Programs\Python\Python37\Scripts\
%USERPROFILE%\AppData\Local\Programs\Python\Python37\

Kieran Wood
- 1,297
- 8
- 15
-
The command python just sends me to a Microsoft Store page to download Python 3.8. I can still use the command py normally though. I will try what you have suggested. – PixelmonMaster Sep 15 '20 at 17:48
-
@PixelmonMaster ah, I see. Don't use the microsoft store version, it breaks permissions. Download it directly from https://python.org/download and then make sure on the first page of the installer to check off "ADD TO PATH" – Kieran Wood Sep 15 '20 at 17:53
-
Im not planning on using the store version. I have already installed it. – PixelmonMaster Sep 15 '20 at 18:25
-
I added those folder paths to my environment variable(Picture here https://imgur.com/a/l3DTxqm). It still does not work. I also tried with the %USERPROFILE% still there, but that failed as well. – PixelmonMaster Sep 15 '20 at 18:42
-
@PixelmonMaster I would uninstall the windows store version then and install it from the website. The windows store version is notorious for these sorts of issues. I tried to find out where it saves the installer but I couldn't find the proper details. – Kieran Wood Sep 15 '20 at 19:51
-
I realized that my last comment regarding the store version wasnt worded well. What I meant to say was that I was not going to install the store version since I already installed 3.7.9 off of the offical python site. – PixelmonMaster Sep 15 '20 at 19:52
-
@PixelmonMaster I see, Try going to ``%USERPROFILE%\AppData\Local\Programs\Python\Python37\`` and running ```python.exe --version``` and see if you get the same result. If you do something is off with the installation and I would re-install. If not then check your PATH for other python instances that might be present. – Kieran Wood Sep 15 '20 at 19:55
-
2@PixelmonMaster alternatively you can use the higher layer python windows launcher that should be installed by default I think. You can run ```py --version``` or ```py
.py``` instead which should use the latest copy unless specified. – Kieran Wood Sep 15 '20 at 19:56 -
Thank you so much for the help. I thought I had left a comment here on Tuesday, but i guess I didn't. When attempting to set the path variables, I noticed my python installation was under Python\Python37-32. After changing it to that things worked perfectly. Sorry for the lack of communication. – PixelmonMaster Sep 19 '20 at 06:11