I am trying to run python from the windows command prompt (windows 10). So the result is the typical one when the path environment variable is not configured
The default location for python.exe should be here: c:\users\xxx\anaconda3
One solution to find where it is, is to open the Anaconda Prompt then execute:
> where python
This will return the absolute path of locations of python eg:
(base) C:\>where python
C:\Users\Chad\Anaconda3\python.exe
C:\ProgramData\Miniconda2\python.exe
C:\dev\Python27\python.exe
C:\dev\Python34\python.exe
You could also just re-install Anaconda, and tick the option add variable to Path.. This will prevent you from making mistakes when editing environment variables. If you make mistakes here, your operating system could start malfunctioning.
In windows 10 you can find it here:
C:\Users\[USER]\AppData\Local\conda\conda\envs\[ENVIRONMENT]\python.exe
C:\Users\<Username>\AppData\Local\Continuum\anaconda2
For me this was the default installation directory on Windows 7. Found it via Rusy's answer
I want to mention that in some win 10 systems, Microsoft pre-installed a python. Thus, in order to invoke the python installed in the anaconda, you should adjust the order of the environment variable to ensure that the anaconda has a higher priority.
To export the exact set of paths used by Anaconda, use the command echo %PATH%
in Anaconda Prompt. This is needed to avoid problems with certain libraries such as SSL.
Reference: https://stackoverflow.com/a/54240362/663028