【解决】Error 0x2 starting python

来源:互联网 发布:用idle打开python文件 编辑:程序博客网 时间:2024/06/05 01:06

错误描述

windows 7上安装Python3.5,并打开git bash,添加环境Python变量,使用如下命令行:

$ winpty python

回车报错:

$ Error 0x2 starting python

解决方案

cmd命令行下输入Python会直接进入Python交互行,为什么git bash不可以呢?

。。
。。。
因为添加环境变量后,没有重启git bash惹。

重启git bash,输入:

$ winpty pythonPython 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:01:18) [MSC v.1900 32 bit (Intel)] on win32Type "help", "copyright", "credits" or "license" for more information.>>> 

成功!

1 0