+3 votes
1 view
in Devops and Agile by (23.6k points)

I have been trying to run my python files in Git Bash but I keep getting an error and can't figure out how to fix it. My command as follows in the git bash executable python filename.py then it says

"Bash.exe": python.exe: command not found

I'm a windows user and I have added the path to my environment variables like so 

C:\Python27\python.exe;C:\Program Files\Git\bin\bash.exe

I have been looking around but I can't find anyone that has had this problem or they don't give a straightforward answer please help.

Also, I have never used Git before this is my first time.

1 Answer

+3 votes
by (16.9k points)
edited by

For this, you need to adapt the path for that you could try:

path=$path:C:\Python27\python.exe;C:\Program Files\Git\bin\bash.exe

After adding this path then try 

python --version

Then you can see that python is installed.

More information regarding git bash please go through the following tutorial:

...