如何从 MobaXterm 运行 Mercurial

如何从 MobaXterm 运行 Mercurial

我使用的是 Windows 10,并且安装了 Cygwin 和 MobaXterm。我需要使用 Mercurial。它在 Cygwin 中运行良好,但我想从 MobaXterm 中运行它。我刚刚为 MobaXterm 安装了 Mercurial 插件,它声称它应该使用 Python 2.7 运行。在我的情况下,我同时拥有 Python 3 和 Python 2。MobaXterm 看不到 Python 2。这是我的环境:

 MobaXterm:
 ~/Desktop @ BOS-LTIRM181511 
| => which hg
hg is aliased to `/bin/hg'
hg is /bin/hg
hg is /drives/c/MobaXterm/slash/bin/hg
________________________________________________________________________________
| ~/Desktop @ BOS-LTIRM181511 
| => which python
python is aliased to `ToolNotIncluded python'
________________________________________________________________________________
| ~/Desktop @ BOS-LTIRM181511 
| => which python3
python3 is /bin/python3
python3 is /drives/c/MobaXterm/slash/bin/python3
________________________________________________________________________________
| ~/Desktop @ BOS-LTIRM181511 
| => /cygdrive/c/Python27/python --version
Python 2.7.15
________________________________________________________________________________
| ~/Desktop @ BOS-LTIRM181511 
| =>
----
Cygwin:
$  hg --version
Mercurial Distributed SCM (version 5.0.2)
(see https://mercurial-scm.org for more information)

Copyright (C) 2005-2019 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

user@BOS-LTIRM181511 /usr/bin
$ which hg
hg is /usr/bin/hg
hg is /usr/bin/hg

user@BOS-LTIRM181511 /usr/bin
$ which python
python is /usr/bin/python
python is /cygdrive/c/Python27/python
python is /usr/bin/python

user@BOS-LTIRM181511 /usr/bin
$ which python3
-bash: type: python3: not found

user@BOS-LTIRM181511 /usr/bin
$ /cygdrive/c/Python27/python --version
Python 2.7.15

---

我该如何修复它并让 Mercurial 从 MobaXterm 运行?

答案1

我可以在电脑上安装 Mercurial 5.7,现在我可以使用 MobaXterm

相关内容