Setting up the APAF build System on Windows

This tutorial winn guide you through the installation of the apaf and its dependencies in a Windows environment.


This tutorial has been tested only on Windows XP sp3 and Windows 7.


This tutorial will start assuming you are on a clean environment. If you have already installed Python, you may consider start reading further.

Install GnuPG

Install GnuPG as a tool to to verify the various software download:

Install Python

Download Python 2.7 from

Verify signature of application:

Install the software following the wizard.

Install Pip

cd C:Python27Scripts C:Python27Scripts> easy_install.exe pip

Install psutil

Required for txtorconn

Download from

Install Zope.interface


Installing zope.interface with pip may lead to ImportError in building the APAF with py2exe.


Tests on windows 7 show that, since easy_install behaves differently from pip.exe, using one instead of another during the setup of the environment may lead to problems afterwards when building the executable.

Install zope.interface using setuptools: ::
C:Python27Scripts> easy_install.exe zope.interface

Install Six

cd C:Python27Scripts C:Python27Scripts> pip.exe install six

Install pygeoip

cd C:Python27Scripts C:Python27Scripts> pip.exe install pygeoip

Install ipaddr

cd C:Python27Scripts C:Python27Scripts> pip.exe install ipaddr

Install pyYAML

cd C:Python27Scripts C:Python27Scripts> pip.exe install pyYAML

Install Git

Since github lets you download a simple .zip of the latest revision of your application, git is not indispensable. But certainly it will be comfortable to stay up to date with the software development

Then open a new Git shell from Start>Git>Git Bash.

Install Txtorcon

Txtorcon is not avaible on the Python Package Index, so you need to install it manually with git.

Then install with pip: ::
cd C:Python27Scripts C:Python27Scripts> pip.exe install C:pathoftxtorcon

Install Apaf

Download Apaf from Github:

Install 7zip

Download and install following the wizard.

It will place 7z.exe in “c:Program Files7-Zip7z.exe”

Extract Tor binary

Download the latest version of Tor binaries for Windows.

Go to download page and download “Expert Bundle”:

Now decompress the tor binary with 7zip and move it to contrib/ directory of APAF:

c:Program Files7-Zip7z.exe x tor- tor.exe move tor.exe PATH_WHERE_IS_BUILD_ENVIRONMENT/contrib

Build Apaf Application

Here you are ready to use the apaf. To build the single .exe file, run

C:\path\of\user\APAF> C:\Python27\python.exe py2exe