Build Bootloader Win64

xoviat edited this page Jan 1, 2017 · 3 revisions

TODO: Update it for python3 branch, add mingw instructions or move this tutorial to manual.

Building the PyInstaller Bootloaders on Windows x64 with free of charge software


Windows Build Tools 2015

Windows Build Tools are required to build extensions for Python 3.5 and above. Make sure to select both the Windows 8.1 SDK and the Windows 10 SDK options. Make sure that the version of setuptools that you are using is at least 24.0. In addition, make sure that your vcvarsall.bat file in %PROGRAMFILES(x86)%\Microsoft Visual Studio 14.0\VC contains the following:

rem Vcvarsall for Visual C++ Build Tools 2015
@echo off
set vcprogramfiles=%ProgramFiles(x86)%
if "%vcprogramfiles%"=="" set vcprogramfiles=%ProgramFiles%
call "%vcprogramfiles%\Microsoft Visual C++ Build Tools\vcbuildtools.bat" %*

Visual Studio 2008 Express

One can not build the x64 boot loader with Visual Studio 2008 Express directly, but it still needs to be installed before we can install the x64 compilers from Windows SDK v7.0. Without Studio, the SDK installation fails with the great error message "fatal error". I installed the ISO image from

Windows SDK v7.0

To get the compilers for Windows x64, you need to install a Windows SDK when building with Visual Studio 2008 Express: I used the ISO Image from which is referenced by this MSDN article:

Python 2.7

To run WAF, we need Python as well. I used the x64 installer from, installed to c:\python27 (default).


For getting the source (and to be able to push back any changes), we need the git scm. Get it from, install with default options (I enabled the git bash context menu in explorer as well).


Checkout the source

Go to some directory (I used %HOMEPATH%) and open a Git bash there. Checkout pyinstaller with

git clone


To run the build, use the Windows SDK Command Shell. Set the PATH to that the python command can be found:

set PATH=%PATH%;c:\python27

Go to the boot loader source directory:

cd %HOMEPATH%\pyinstaller\bootloader

Now the boot loader can be build by running

python waf configure build install

Testing the build

For running the tests we need to install pywin32 from (this is what the test runner says when you don't have it). I got mine from With that out of the way, the tests can be run using

cd %HOMEPATH%\pyinstaller\tests
python -i

This only runs a small part of the tests. To get better coverage, we need to download the Python modules that are used during the tests. The script does that automatically, but it requires setuptools to be installed. To install setuptools it suffices to download the script from and run it. With the following commands most tests will run (hopefully):

cd %HOMEPATH%\Downloads
cd %HOMEPATH%\pyinstaller\tests
python -d %HOMEPATH%\Downloads