【发布时间】:2017-05-20 19:06:06
【问题描述】:
我在我的 Win7 系统上安装了 python 3.6,并试图让它在 git bash (MINGW64) 中运行,但到目前为止无济于事。
我已将安装目录(当然不是 .exe)添加到 PATH,但没有任何结果。
即使我直接cd到安装目录也看不到。
$ python
bash: python: command not found
$ echo $PATH
/c/Users/Aerovistae/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Users/Aerovistae/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Program Files/Intel/WiFi/bin:/c/Program Files/Common Files/Intel/WirelessCommon:/cmd:/c/Program Files (x86)/Skype/Phone:/c/Program Files/Intel/WiFi/bin:/c/Program Files/Common Files/Intel/WirelessCommon: C:/Users/Aerovistae/AppData/Local/Programs/Python/Python36-32:/usr/bin/vendor_perl:/usr/bin/core_perl
$ cd C:/Users/Aerovistae/AppData/Local/Programs/Python/Python36-32
$ python
bash: python: command not found
$ python.exe
bash: python.exe: command not found
如果我从该目录中尝试./python,当我按下回车键时它会转到下一行,并允许我继续输入,因为它出于某种原因对命令有更多期望。 ./python 未被识别为完整的命令,它正在等待关闭,就好像我有一个开放式引用但没有关闭式引用一样。不知道为什么。
我在这里缺少什么?为什么我在目录下也不能运行.exe?
旁注,为什么将PATH 显示为具有冒号分隔符而不是分号分隔符?
【问题讨论】:
-
你是如何将 Python 安装目录添加到 PATH 中的?
标签: python windows mingw git-bash mingw-w64