I have zero experience with Python; I've been using the precompiled binaries of Mercurial on Windows XP.
I am trying to install the prerequisites for Hatta.
- I got Python 2.6.1
- I got werkzeug
-> please note that the werkzeug install instructions are kind of confusing except for when they say use "easy_install" -> please note that the easy_install instructions on the python website do not (yet) tell you how to bootstrap your install of easy_install. IBM has a good article http://www.ibm.com/developerworks/library/l-cppeak3.html on how to install easy_install. -> Once you run ez_setup.py it is fairly simple to run "easy_install werkzeug".
- I got Hatta but I am not sure whether it worked because of the windows install, or it worked because I ran "easy_install {my-install-dir}/Hatta-Wiki-1.2.2.zip
- I had to find where it put Hatta. I finally figured it out, it's in {my-Python-install-dir}/Lib/site-packages
- I ran hatta.py and it complained "ImportError: No module named mercurial.hg"
- I figured out that this meant I needed the Python version of mercurial rather than the executable. I tried running "easy_install mercurial" but this put the mercurial package who-knows-where on my computer.
- I finally tried "easy-install -b {pick-a-temp-directory} –verbose -U mercurial | tee logfile.log"; the -b keeps the temp files around in a directory of your choice, the "--verbose" and "tee" keeps a copy of all the install verbiage
- I finally figured out to take a copy of the "build" directory in the temp dir that I installed mercurial, and then put it in a non-temporary place, and add that directory to my PYTHONPATH environment variable.
- It still doesn't work, I get this error message complaining that bdiff is missing:
ImportError: No module named bdiff
I'm stuck and I don't know what to do next, whether it's Hatta's fault or Mercurial's.
This install process is too difficult! I don't mind running software I don't understand, but please try to anticipate problems and give some guidance on what errors might be expected and/or what to do about them. (not just Hatta, but the Python version of Mercurial and easy_install both have this problem)
I am aware that python is far from "the windows way", and I don't really know what can be done about it, except for just getting py2exe and compiling Python, Werkzeug, Mercurial, Pygments into a single executable file that "just works". I know it can be done, but I don't really have much experience with py2exe in particular and windows in general – I only have access to a windows box about once a week (and, to be honest, I'm pretty happy it's not more often).
Installing Mercurial in the Python's site-packages (that's the "who-knows-where") should be enough for Hatta to work. The "bdiff" module, that it complains about, is the small binary part of Mercurial that has to be compiled when installing it – just copying the sources won't work here, like with plain Python modules.
Thanks for you interest in Hatta, now that I know I have at least one Windows user, I will try to assign the py2exe plans a higher priority. – Radomir Dopieralski
cool, thanks. I don't need a single executable file (that would be nice but they seem too fragile). Just that I'm unfamiliar with Python – it would be great if you could grab the ear of someone who's experienced with how Python works under Windows (which install directories have to be where) + write up a 5 paragraph description saying "do a,b,c" and "watch out for d,e,f". (and again, most of the problem I had isn't with Hatta but with the docs for Mercurial and Python)
>Installing Mercurial in the Python's site-packages
er, um, what does that mean exactly? that the "mercurial" and "hgext" directories are to be copied under the "site-packages" directory? or the files within those directories go there?
Easy-install already does what's necessary, just getting rid of the direcotires you copied yourself should make it all work (the copy you made misses the bdiff binary). Easy-install automatically puts the modules in a place accessible for the Python interpreter that runs it.
If that doesn't work, you can try just downloading the sources of Mercurial and running the setup.py file inside with "install" parameter.
From what I've heard, py2exe is not fragile, it's been developed since quite some years and I think a single executable would really make things easy. That would solve it once and for all – Radomir Dopieralski
Ok, the 1.2.3 release has now a setup.exe windows installer that installs a Hatta execeutable – you don't need to install any dependencies yourself (except for some MSVC*.DLL files which I can't redistribute). – Radomir Dopieralski
![[Home]](/+download/logo.png)