首页 > 解决方案 > 有没有办法在没有 Python2 的情况下在 Ubuntu 焦点上安装 Mercurial?

问题描述

我非常注意不要在我最新的 Ubuntu 焦点 amd64 系统中包含 python 2.x。我在不注意的情况下安装了 mercurial (sudo apt install mercurial) 的错误。它安装了以下软件包。

The following package was automatically installed and is no longer required:
  python3-magic
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  libpython2-stdlib libpython2.7-minimal libpython2.7-stdlib mercurial-common python2 python2-minimal python2.7 python2.7-minimal
Suggested packages:
  kdiff3 | kdiff3-qt | kompare | meld | tkcvs | mgdiff qct python-mysqldb python-openssl python-pygments wish python2-doc python-tk python2.7-doc binfmt-support
The following NEW packages will be installed:
  libpython2-stdlib libpython2.7-minimal libpython2.7-stdlib mercurial mercurial-common python2 python2-minimal python2.7 python2.7-minimal

有没有办法避免python2?

标签: pythonmercurial

解决方案


是的,从 Mercurial v5.2 开始:

python3 -m pip install mercurial

https://www.mercurial-scm.org/wiki/Python3


推荐阅读