Installation#
Mercurial is written in Python, C and Rust with platform independence in mind. As a result, Mercurial is available on Microsoft Windows, GNU/Linux, macOS, Solaris 11 Express and others. You can either download a binary package for the system of your choice or build from source.
For those looking for the utmost performance, a growing part of Mercurial is being written in Rust. For more information, see Rust in Mercurial.
Windows users are likely to enjoy the TortoiseHg GUI the most, which integrates Mercurial directly into File Explorer.
Packages for common Linux and BSD distributions can be installed from the system specific repositories:
apt install mercurial
dnf install mercurial
pacman -S mercurial
emerge mercurial
brew install mercurial
Binary packages can be installed using pkg
:
pkg install mercurial
Alternatively, you can install from source via the ports collection:
cd /usr/ports/devel/mercurial
make install
Mercurial is available on PyPI as wheels and sdist, so one can install the last stable version with any PyPI front-ends (like UV, pipx, pip, …):
uv tool install mercurial
pipx install mercurial
pip install mercurial
Finally, the Mercurial conda-forge package can be installed as a global tool with Miniforge or Pixi:
conda activate base
pip install conda-app
conda-app install mercurial
pixi global install mercurial