How to install tortoise hg Mercurial on Windows, virtual environment

392 Views Asked by At

I am trying to install Django's debug_toolbar line profiler. As per the docs, I need to install Mercurial.

I have installed Mercurial on my Windows machine and it looks OK when I type hg in the command prompt outside of my project's virtual environment. The problem is that the same command throws an error when I enter it inside the virtual environment:

ERROR: Error [WinError 2] The system cannot find the file specified while executing command hg clone --noupdate -q https://bitbucket.org/kmike/line_profiler 'c:\[user]\environments\[project]\src\line-profiler'

ERROR: Cannot find command 'hg' - do you have 'hg' installed and in your PATH?

How do I fix that? The end goal is to install line_profiler

1

There are 1 best solutions below

0
On

ERROR: Cannot find command 'hg' - do you have 'hg' installed and in your PATH?

The key is this error message. Do you have the path to the hg.exe included in your Windows path? What does your "virtual environment" mean exactly?

In my eyes the easies way to get working mercurial on Windows is to use scoop.

Then you don't have to worry about adding the path, just install mercurial via

scoop install mercurial

and you are done.