Python Scripts using Mercurial module on Windows

TK Soh teekaysoh at
Sun Jul 22 19:43:54 CDT 2007

On 7/23/07, Steven Yi <stevenyi at> wrote:
> Hi All,
> I was trying to run yasvn2hg on Windows but I get "no module named
> mercurial.ui".  I've tried some other scirpts that import from
> mercurial without luck.  I used the Windows binary installer to
> install but it did not seem to install anything into my python
> install's site-packages.  I did notice the in my
> c:\Mercurial directory and that seems to have everything, but I am not
> sure what from there I would need to install into my python
> site-packages to get these scripts to work or if I should be doing
> something altogether differently.
> Any help with this very much appreciated!

Try adding you the search path before importing mercurial:

  import sys
  sys.path.append(r'C:\Program Files\Mercurial\')

  from mercurial import commands

More information about the Mercurial mailing list