by @kodeazy
python is not recognized as an internal or external command.
- I had installed python
3.10.1
but when I try to executepython
command incommand prompt
I am getting the below error.
-
To resolve the problem first get the
path
of python by executing the below command incommand prompt
.py -c "import os, sys; print(os.path.dirname(sys.executable))"
Below is my path after executing the command
C:\Users\JOHN\AppData\Local\Programs\Python\Python310
- Now added the path in environment variable by creating a
new
variable as below.
- Now after restarting the
PC
try executing thepython
command as below.