0

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

StayOnTarget
  • 11,743
  • 10
  • 52
  • 81
EarlyCoder
  • 1,213
  • 2
  • 18
  • 42
  • Clone repo from host-OS and place in needed location?! I cant see any other references of **needed** Mercurial except cloning of repo one time for start – Lazy Badger Oct 25 '19 at 10:13
  • is there a way to use pip for this? – EarlyCoder Oct 25 '19 at 13:34
  • No... PIP cant install Mercurial, and what for? You have HG in host-OS, thus - can clone https://bitbucket.org/kmike/line_profiler to local drive and just move it to location, from which it can be used by guest-OS – Lazy Badger Oct 25 '19 at 15:19

1 Answers1

0

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.

tukan
  • 17,050
  • 1
  • 20
  • 48