我想hg-git
使用python pip安装扩展,但不确定是否应该使用pip
(Python2)或pip3
(Python3)。
hg version
给出以下内容:
$ hg version
Mercurial Distributed SCM (version 4.8.2)
(see https://mercurial-scm.org for more information)
Copyright (C) 2005-2018 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.
Enabled extensions:
fetch internal
graphlog internal
histedit internal
strip internal
mq internal
purge internal
rebase internal
record internal
$
我首先尝试过pip3 install hg-git
,但安装后无法正常工作。然后我用了pip
,它起作用了。只是好奇如何首先检查Mercuial的Python版本。
我正在运行Ubuntu 20.04,并且在我的Mercurial版本(5.3.1)上仍在使用Python2,因此我想它应该是相同的。您可以使用以下方法进行检查:
$ head -1 /usr/bin/hg
#! /usr/bin/python2
如果是这样,/usr/bin/python
则还可以检查它是什么版本:
$ python --version
Python 2.7.18
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句