python3 : The term 'python3' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

- 25,369
- 29
- 96
- 135

- 193
- 2
- 2
- 8
-
1Welcome to Stack Overflow! To give you a great answer, it might help us if you have a glance at [ask] if you haven't already. It might be also useful if you could provide a [mcve]. – Mat Jan 03 '19 at 14:17
-
1Please don't post code as image but as text. This is easier to read, to find and to copy. – Klaus Gütter Jan 03 '19 at 14:22
-
Also, what's the actual question? – Mad Physicist Jan 04 '19 at 02:14
5 Answers
Make sure you add python to your system path
And try using python not python3
And try to run your code in native command line of windows

- 1,076
- 1
- 11
- 22
-
I added the path to environment variables and tried with python instead of Python3!, It is working now! Thank you! – RoosyDepp Jan 05 '19 at 14:25
-
great replacing python3 with python solved my problem ) thank you ) – Alijon Jumanazarov Nov 09 '21 at 21:51
commands with python3 works for macOS/Linux. Use python for windows OS.
I ran into the same problem while creating a virtual environment for my project. Following instructions are quoted from https://code.visualstudio.com/docs/python/tutorial-django
macOS/Linux
sudo apt-get install python3-venv # If needed
python3 -m venv env
Windows
python -m venv env

- 51
- 1
- 3
Assuming you installed the Python launcher when you installed Python, even without python3
in your PATH
, you should be able to launch Python with py -2
(to use the most recent installed Python 2 version) or py -3
(to use the most recent installed Python 3 version), thanks to PEP 397: Python launcher for Windows.

- 143,180
- 12
- 188
- 271
Install python library by using "Run as administrator" and then try it again.
Trust me, I faced the same issue and it worked for me. Don't forget to check the "add python to path" option like in this image.

- 49,934
- 160
- 51
- 83

- 1
I was able to fix the error by simply replacing python3 file.py with python file.py

- 1
- 1
-
1Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jun 29 '23 at 12:24