Mercurial / IIS / No module named osutil

2.6k Views Asked by At

I am trying to get Mercurial to be hosted via "hgweb.cgi" on IIS 7.5. I have everything configured according to http://www.jeremyskinner.co.uk/mercurial-on-iis7/ except for that I installed python 2.6 and Mercurial 1.7.3. When I try to go to the hgweb.cgi script, I get the following error:

"No module named osutil"

After a bit of searching, I've found that I need to install the python-dev packages, but that seems to only apply to unix. Is there anything else I need to get this working on windows?

Thanks.

Note that I tried the mercurial binaries/library.zip on both both HgTortoise and the Mercurial x86 installer available here:

https://www.mercurial-scm.org/downloads

(Mercurial 1.7.3 Inno Setup installer - x86 Windows - does not require admin rights)

3

There are 3 best solutions below

1
On

Looking at the available downloads and the version specified in the question, it looks like you might have installed TortoiseHg 1.1.8 with Mercurial 1.7.3, which is probably missing some python packages.

0
On

I've been researching this problem myself (except I'm trying to run Mercurial via ISAPI), and it appears 1.7.1 is the last version that works with IIS due to dependency problems with msvcr90.dll in all later versions, including the newly released 1.8.2.

See this issue, which ultimately seems to be caused by this still open 1-year-old Python issue.
Judging by the conversation, a fix is not easy. I know of no workarounds, so I am forced to use 1.7.1 in the meantime.

Edit: CGI works with 1.8.2 though, so the above issue seems to only affect running Mercurial through ISAPI.

0
On

I had the same issue trying to re-create an HgWeb server with Mercurial 2.1.1. I posted a question on the Mercurial mailing list.

Because HgWeb requires Python, you have to get Mercurial as a Python module. Fortunately, the Mercurial folks supply one; it's tagged py2.6 with the description

installs Mercurial source as Python modules and thus requires Python 2.6 installed. This is recommended for hgweb setups

Once I ran that installer, HgWeb started working.