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
Provide the Directory/Folder path where python.exe is available in Anaconda folder like
C:\Users\user_name\Anaconda3\
This should must work.
it turns out I was mistaken.
Solution is: in anaconda (as well as in other implementations), set the path environment variable to the directory where 'python.exe' is installed.
As a default, the python.exe file in anaconda is in:
c:\.....\anaconda
after you do that, obviously, the python command works, in my case, yielding the following.
python
Python 3.4.3 |Anaconda 2.2.0. (64|bit)|(default, Nov 7 2015), etc, etc
You can also run conda init
as below,
C:\ProgramData\Anaconda3\Scripts\conda init cmd.exe
or
C:\ProgramData\Anaconda3\Scripts\conda init powershell
Note that the execution policy of powershell must be set, e.g. using Set-ExecutionPolicy Unrestricted
.
C:\Users\\Anaconda3
I just added above path , to my path environment variables and it worked. Now, all we have to do is to move to the .py script location directory, open the cmd with that location and run to see the output.
Instead of giving the path following way:
C:\Users\User_name\AppData\Local\Continuum\anaconda3\python.exe
Do this:
C:\Users\User_name\AppData\Local\Continuum\anaconda3\