Saturday 23 February 2013

Installing Nikola on Windows 7

The new version of Nikola was released and wanted to know if I could use it for

I started by trying to pip install nikola into a virtualenv, but it didn't work out of the box.
The reason it was not installing out of the box was due to the fact windows doesn't have a build chain installed, and pip doesn't use eggs or exes.
Here are the steps I took to install nikola on my windows 7 laptop into a virtualenv

I will assume that you have python 2.7 installed (like me) and that you have also installed virtualenv

1) Create and activate a new virtual environment

2) Download pillow from pypi:

3) Run easy_install on the downloaded egg
easy_install %HOME%\Downloads\Pillow-1.7.8-py2.7-win32.egg
4) Download the unofficial build of lxml from

5) Run easy_install on the downloaded exe
easy_install %HOME%\Downloads\lxml-3.1.0.win32-py2.7.exe 
6) pip install the nikola package
pip install nikola
Once I had installed it I tried the steps to set up a demo in the nikola handbook and found I had some issues as well.  They seem that they are going to be fixed but I will document them here for future reference.

1) I tried "nikola init mysite --demo" but got a "error not found" this is due to the fact that windows doesn't have executable scripts the same as *nix environments, and so the nikola script is not runnable by itself.  The easy way to fix this is just to copy the bat script from doit (installed as a requirement) to nikola.bat
copy venv\Scripts\doit.bat venv\Scripts\nikola.bat
2) Continuing on with the demo I found the nikola build command was failing because a temp file wasn't being deleted.  This should be being fixed in
Till then I just added

No comments: