/bin/env: python: No such file or directory (Windows through Git Bash trying to install new Parse Cloud Code)
This error means that Git Bash does not know where your python.exe is. It searches your normal windows search path, the PATH
environment variable. You're probably failing the 4th step on the instructions already "Make sure Python is working in the Git Bash":
$ python --versionsh.exe: python: command not found
To fix that, append C:\Python
(or wherever you installed python) to your PATH
environment variable in windows (instructions here). You need to restart the bash after this for the change to take effect. This will allow you to run python from the windows command prompt as well.
C:\> python --versionPython 2.7.2
If you don't want to alter your windows PATH
variable or make python only available to git bash, you could create a .bashrc
file in your %USERPROFILE%
directory and set the variable there:
C:\>notepad %USERPROFILE%\.bashrc
and add
export PATH=/c/Python:$PATH
to the file. That script is executed every time you start the git bash and prepends C:\Python
to git bash's PATH
variable, leaving the system-wide PATH variable untouched.
Now that you know what has to be done, you can use this shortcut on the bash instead (appends the export command to your .bashrc)
$ echo export PATH=/c/Python:\$PATH >> ~/.bashrc
I think you can add the location of the python.exe in the PATH environment variable. Follow the steps: Go to My Computer->Right click->Properties->Advanced System Settings->Click Environmental Variables. Now click PATH and then click EDIT. In the variable value field, go to the end and append ';' (without quotes) and then add the absolute path of the .exe file which you want to run via Git-Bash.