Add “python2” path to command line on Windows 7
This answer copied from my own answer, and customized to this question.
Try following command.
set path=%path%;c:\python27
PATH
is set only for the cmd.exe in which you run the above command.
To permanently set PATH:
- Right click My computer in the desktop.
- Click Advanced System Settings on the left.
- Click Environmental Variable.
- Add or Update
PATH
variable:- If it does not exist, create one, and set value as
C:\python27
- If it exist, append
;C:\Python27
to existing value.
- If it does not exist, create one, and set value as
- Restart cmd.exe. (PATH will not change for already launched cmd.exe)
UPDATE
If you want to use python2, copy the executable.
CD C:\python27
COPY python.exe python2.exe
Had the same problem and fixed it...
I have C:\Python27
, which i have added to my environment variables which gave me access to "python" though the CMD.. but for installing node-sass though npm, which was my problem, it continues to say that "python2" is not found. A friend the told me i could just rename name executable, which i didn't belive, but it worked :-)
The rename was from:
C:\Python27\python.exe
> C:\Python27\python2.exe
It works for me, even though it find it weird just renaming a file.. but then, i am not hardcore in the windows CMD.