<分区>
基本上,我在 Git Bash 命令行中输入 python
,然后返回一个空白行,就好像命令行在思考...
我做了很多研究,但我似乎无法通过在命令行中输入 python 在 Git Bash 上运行 python。
我在看问题:Python not working in the command line of git bash 有人建议输入:
winpty c:/Python34/python.exe
进入命令行,它成功了!但是,我不想一直在命令行中键入整个命令。
<分区>
基本上,我在 Git Bash 命令行中输入 python
,然后返回一个空白行,就好像命令行在思考...
我做了很多研究,但我似乎无法通过在命令行中输入 python 在 Git Bash 上运行 python。
我在看问题:Python not working in the command line of git bash 有人建议输入:
winpty c:/Python34/python.exe
进入命令行,它成功了!但是,我不想一直在命令行中键入整个命令。
最佳答案
"One caveat if using Git Bash with MinTTY: python doesn't go into interactive mode so a solution is to force it to start that way: echo alias python=\"python -i\" >> ~/.bash_profile"]
我遇到了同样的问题,使用“python -i”解决了它。
关于Python 3 不会从 Git Bash 命令行运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35471179/