I have installed the latest Python for Win10 from Releases for Windows. Just typing py in the Command Prompt Window starts Python.

Microsoft Windows [Version 10.0.15048]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\Users\sg7>py
Python 3.6.3 (v3.6.3:2c5fed8, Oct  3 2017, 18:11:49) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>`enter code here`

Testing:

>>> print("hello!")
hello!
>>>

Please be aware that in my case Python was installed in C:\Users\sg7\AppData\Local\Programs\Python\Python36> directory

C:\Users\sg7\AppData\Local\Programs\Python\Python36>dir
 Volume in drive C is Windows7_OS
 Volume Serial Number is 1226-12D1

 Directory of C:\Users\sg7\AppData\Local\Programs\Python\Python36

08/05/2018  07:38 AM    <DIR>          .
08/05/2018  07:38 AM    <DIR>          ..
12/18/2017  09:12 AM    <DIR>          DLLs
12/18/2017  09:12 AM    <DIR>          Doc
12/18/2017  09:12 AM    <DIR>          include
12/18/2017  09:12 AM    <DIR>          Lib
12/18/2017  09:12 AM    <DIR>          libs
10/03/2017  07:17 PM            30,334 LICENSE.txt
10/03/2017  07:17 PM           362,094 NEWS.txt
10/03/2017  07:15 PM           100,504 python.exe
10/03/2017  07:12 PM            58,520 python3.dll
10/03/2017  07:12 PM         3,610,776 python36.dll
10/03/2017  07:15 PM            98,968 pythonw.exe
08/05/2018  07:38 AM           196,096 Removescons.exe
08/05/2018  07:38 AM            26,563 scons-wininst.log
08/05/2018  07:38 AM    <DIR>          Scripts
12/18/2017  09:12 AM    <DIR>          tcl
12/18/2017  09:12 AM    <DIR>          Tools
06/09/2016  11:53 PM            87,888 vcruntime140.dll
               9 File(s)      4,571,743 bytes
              10 Dir(s)  20,228,898,816 bytes free

When I am at C:\Users\sg7> directory level python can be invoked by typing AppData\Local\Programs\Python\Python36\python

C:\Users\samg>AppData\Local\Programs\Python\Python36\python
Python 3.6.3 (v3.6.3:2c5fed8, Oct  3 2017, 18:11:49) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

Newer Python 3.7 will be installed at: C:\Users\YourUserNameHere\AppData\Local\Programs\Python\Python37

If you wish you can add to your path environment variable: %USERPROFILE%\AppData\Local\Programs\Python\Python36

Answer from sg7 on Stack Overflow
Top answer
1 of 16
145

I have installed the latest Python for Win10 from Releases for Windows. Just typing py in the Command Prompt Window starts Python.

Microsoft Windows [Version 10.0.15048]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\Users\sg7>py
Python 3.6.3 (v3.6.3:2c5fed8, Oct  3 2017, 18:11:49) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>`enter code here`

Testing:

>>> print("hello!")
hello!
>>>

Please be aware that in my case Python was installed in C:\Users\sg7\AppData\Local\Programs\Python\Python36> directory

C:\Users\sg7\AppData\Local\Programs\Python\Python36>dir
 Volume in drive C is Windows7_OS
 Volume Serial Number is 1226-12D1

 Directory of C:\Users\sg7\AppData\Local\Programs\Python\Python36

08/05/2018  07:38 AM    <DIR>          .
08/05/2018  07:38 AM    <DIR>          ..
12/18/2017  09:12 AM    <DIR>          DLLs
12/18/2017  09:12 AM    <DIR>          Doc
12/18/2017  09:12 AM    <DIR>          include
12/18/2017  09:12 AM    <DIR>          Lib
12/18/2017  09:12 AM    <DIR>          libs
10/03/2017  07:17 PM            30,334 LICENSE.txt
10/03/2017  07:17 PM           362,094 NEWS.txt
10/03/2017  07:15 PM           100,504 python.exe
10/03/2017  07:12 PM            58,520 python3.dll
10/03/2017  07:12 PM         3,610,776 python36.dll
10/03/2017  07:15 PM            98,968 pythonw.exe
08/05/2018  07:38 AM           196,096 Removescons.exe
08/05/2018  07:38 AM            26,563 scons-wininst.log
08/05/2018  07:38 AM    <DIR>          Scripts
12/18/2017  09:12 AM    <DIR>          tcl
12/18/2017  09:12 AM    <DIR>          Tools
06/09/2016  11:53 PM            87,888 vcruntime140.dll
               9 File(s)      4,571,743 bytes
              10 Dir(s)  20,228,898,816 bytes free

When I am at C:\Users\sg7> directory level python can be invoked by typing AppData\Local\Programs\Python\Python36\python

C:\Users\samg>AppData\Local\Programs\Python\Python36\python
Python 3.6.3 (v3.6.3:2c5fed8, Oct  3 2017, 18:11:49) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

Newer Python 3.7 will be installed at: C:\Users\YourUserNameHere\AppData\Local\Programs\Python\Python37

If you wish you can add to your path environment variable: %USERPROFILE%\AppData\Local\Programs\Python\Python36

2 of 16
109

It finally worked!!!

I needed to do things to get it to work

  1. Add C:\Python27\ to the end of the PATH system variable
  2. Add C:\Python27\ to the end of the PYTHONPATH system variable

I had to add these to both for it to work.

If I added any subdirectories, it did not work for some reason.

Thank you all for your responses.

Discussions

Can't Fix 'python not recognized as a command' in cmd.
I don't use Windows, but this has to be something to do with your system path. If you find where python.exe was installed and cd to that directory, does it work? Edit: Downvoted myself to get this out of top position, there's a better answer ! More on reddit.com
🌐 r/learnpython
7
2
January 2, 2023
Python: command not found
Hi I’m very new to Python and I’m trying to get it set up with VSC, however I keep getting the following error whenever I try to run any commands: /bin/sh: python: command not found I’ve googled and tried solutions such as installing homebrew, but to no avail. More on discuss.python.org
🌐 discuss.python.org
2
0
December 28, 2022
How to Resolve Python Command Not Found Error in Linux
However, encountering the error ... Command Not Found" can be frustrating, especially when you're trying to work with Docker containers. Here, we'll explore ... Starting from Ubuntu 14.04, a new command called apt was introduced, which didn’t exist in earlier versions. The apt command combines features from several other package management tools like apt-get and apt-cache, offering a simplified interface with additional features such as colorized output and ... Python is a flexible ... More on geeksforgeeks.org
🌐 geeksforgeeks.org
1
February 28, 2024
Im trying to install Python, yet it keeps saying "Python was not found;". I installed it as a path, manually installed it as a path, help.
You must realize that what you've given us so far amounts to nothing. We don’t know the context,what os you're using, how you tried to install,basically, nothing actionable. Wanna try that again? More on reddit.com
🌐 r/learnpython
31
4
October 26, 2024
🌐
Python.org
discuss.python.org › python help
Python not found by command prompt - Python Help - Discussions on Python.org
February 11, 2024 - I have installed Python in Windows 11 and saved a small script called unicode.replacer.py In the command prompt, in the correct directory, when I attempt to execute: python unicode.replacer.py command prompt reports: …
🌐
Reddit
reddit.com › r/learnpython › can't fix 'python not recognized as a command' in cmd.
r/learnpython on Reddit: Can't Fix 'python not recognized as a command' in cmd.
January 2, 2023 -

When I type 'python -m pip install [something]',I know that i can just say pip install but in general it says 'Python nije prona' or in english ' python is not recognized as an internal or external command, operable program or batch file. '
I've tried to fix it countless times by reinstalling, deinstalling every python file i have on my pc then reinstalling it, adding python to the path in environment variables and yet nothing worked. Does anyone have a solution for this?

🌐
PhoenixNAP
phoenixnap.com › home › kb › sysadmin › how to fix the "python: command not found" error
How to Fix the "python: command not found" Error
April 29, 2026 - The Python symbolic link is not configured correctly. ... Verify the Python installation and install Python if necessary. Edit PATH variable to include the Python executable path.
🌐
C# Corner
c-sharpcorner.com › article › python-py-works-but-python-doesnt
Python -- "py" works, but "python" doesn't
June 2, 2023 - The reason is the command python does not set up the environment PATH correctly, while py does because py is itself located in C:\Windows that is always part of the PATH, which is why you found it.
🌐
Quora
quora.com › Why-is-Python-not-working-in-CMD
Why is Python not working in CMD? - Quora
Answer: Have you checked your path variable? If python is not in the path variable, it will not work. To check, 1. Open Control Panel 2. Navigate to System 3. Go in advanced system settings 4. Go in environment variables 5. In System variables, search for path. 6.Double click on path to open e...
Find elsewhere
🌐
Medium
medium.com › @viknesh2798 › how-to-fix-the-issues-while-using-python-command-in-the-command-prompt-ba56d9018c5f
[SOLVED] Windows: Python command not found in CMD and Microsoft store pops up when I type python in CMD..! | by Viknesh M R | Medium
April 30, 2022 - This is because, the windows system will check the command in the path and prioritize the path from top to bottom. If you move the python path above the Microsoft store path.
🌐
Python.org
discuss.python.org › python help
Python: command not found - Python Help - Discussions on Python.org
December 28, 2022 - Hi I’m very new to Python and I’m trying to get it set up with VSC, however I keep getting the following error whenever I try to run any commands: /bin/sh: python: command not found I’ve googled and tried solutions suc…
🌐
Educative
educative.io › answers › err-python-is-not-recognized-as-an-internal-or-external-command
Err: Python is not recognized as an internal or external command
This Python error occurs Python is not added to the system's PATH environment variable during installation. The PATH variable in windows tells the operating system where to find executable files, and if Python is not included in it, the system ...
🌐
GeeksforGeeks
geeksforgeeks.org › how-to-resolve-python-command-not-found-error-in-linux
How to Resolve Python Command Not Found Error in Linux - GeeksforGeeks
February 28, 2024 - Getting the "Python command not found" error in Linux usually means Python is missing or not properly set up on your system. This common issue can be caused by missing installations, incorrect PATH settings, or version mismatches.
🌐
Stack Overflow
stackoverflow.com › questions › 63692462 › why-doesnt-any-python-commands-work-in-my-command-line
windows - Why doesn't any python commands work in my command line? - Stack Overflow
Update: Here is another snap of my command line after running commands in one answer and comments. Also, I think the problem lies within the PATH setting but PATHs are already added. image to enviornment variables, image to system variables ... I suspect from your description that you have created an empty file called python.cmd or (less likely) python.bat that is in a folder that comes earlier in the path than your Python installation folder.
🌐
Fjolt
fjolt.com › article › python-command-not-found
How to fix 'zsh: command not found: python'
August 13, 2022 - The next step is to add python to zsh so that it will run upon typing the python command.
🌐
GitHub
github.com › PowerShell › PowerShell › issues › 24662
PowerShell does not show output of `where python` command · Issue #24662 · PowerShell/PowerShell
December 11, 2024 - Run command where python on PowerShell and Command Prompt. There might be more commands that does not print output to the console.
Author   PowerShell
🌐
docs.python.org
docs.python.org › 3 › faq › windows.html
Python on Windows FAQ — Python 3.14.6 documentation
It may be possible to use SWIG’s %typemap command to make the change automatically, though I have not been able to get this to work (I’m a complete SWIG newbie).
🌐
CodeWithHarry
codewithharry.com › blogpost › solving-python-not-found-run-without-arguments
[Solved] python was not found; run without arguments to install from the microsoft store, or... | Blog | CodeWithHarry
This error typically occurs when the Python interpreter's path is not correctly set in your environment variables. This can happen for a variety of reasons, including improper installation or system updates. The good news? The fix is straightforward. For most people, the simple fix is to install ...