混帐击将不会运行我的Python文件? [英] Git Bash won't run my python files?

查看:144
本文介绍了混帐击将不会运行我的Python文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试运行在Git中猛砸我的Python文件,但我不断收到一个错误,并不能找出如何解决它。我的命令,如git的bash的可执行如下蟒蛇filename.py 然后它说

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

我是Windows用户,我已经添加的路径,我的环境变量,像这样 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.

此外,我从来没有使用以前的Git这是我的第一次。

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

推荐答案

适应的 PATH 应该工作。只是试图在我的Git的bash:

Adapting the PATH should work. Just tried on my Git bash:

$ python --version
sh.exe": python: command not found

$ PATH=$PATH:/c/Python27/

$ python --version
Python 2.7.6

在具体地,仅提供的目录;不指定 .exe文件 PATH ;并用斜杠。

In particular, only provide the directory; don't specify the .exe on the PATH ; and use slashes.

这篇关于混帐击将不会运行我的Python文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆