Skip to content


auto edited this page May 1, 2012 · 6 revisions

Installing Pyjamas and Pyjamas Desktop for Windows

(article contributed by Mike Truty)

I write in with questions from time to time and I really like
Pyjamas.  I noticed some concern about getting Pyjamas running on
Windows in some posts and I wanted to verify that I got Pyjamas
running on Windows today in around 30minutes with the following
recipe.  It's really straightforward and this is Windows Vista 64-bit
SP1.  This is just a checkpoint to reinforce that Pyjamas and Pyjamas
Desktop are functional on Windows.  Big thanks to lkcl for his GREAT
work and I'm sure others as well!  Mike

Here is the short recipe:


1. Open an Administrator command-line and do everything from there.
2. Install Python 2.6.2 for Windows.
  A. Download Python 2.6.2 for Window from:
  B. Run the installer from the command line and choose all the
  C. Mine installs to C:\Python26
3. Download Pyjamas:
You can do this via Sourceforge (Option 1) or if you're feeling daring, Git (Option 2)
Option 1:
  A. Download from
  B. Extract.
  C. Mine installed to C:\Pyjamas\v6
  D. You may have issues if pyjamas is installed to a directory with a space in it's path.
Option 2:
  A. Install msysgit from:
  B. Install TortisGit from:
  C. Create a directory C:\Pyjamas\
  D. Open an explorer window, and navigate to the C:\ drive.
  E. Right click on the Pyjamas directory and select Git Clone.
  F. Enter the URL:
     The code will download after hitting OK
  G. After this point, wherever C:\Pyjamas\v6 replace it with C:\Pyjamas\pyjamas\
4. Install comtypes 0.6.1.
  A. Download from
  B. Run installer from the command line.
  C. Mine seems to create files under C:\Python26\Lib\site-packages
5. [Optional?] Install Python for Windows Extensions (pywin32) from:
  A. I'm not sure if this is even necessary anymore.

(lkcl: no, it's not)

  B. I did install it by running the installer from the command line.
  C. It does seem to add some packages/files under C:\Python26\Lib

6. Permanently update the path for Python and Pyjamas.
  A. Go to System Properties.
  B. Open the advanced tab, then click on the Environmental Variables button
  C. I added the following to my path system variable: c:\python26;c:\Pyjamas
\v6\bin; (If you used Git, add c:\python26;c:\Pyjamas
\pyjamas\bin; the bin directory will be created after running
  D. Close/re-open the Admin command line.


Initialize Pyjamas and create/update the bin directory:
  A. cd C:\Pyjamas\v6 (If using Git, C:\Pyjamas\pyjamas)
  B. > python

I modified my bin\pyjsbuild.bat.  I'm not sure if there is a better
way to fixup PYTHONPATH.

  set PYTHONPATH=c:\bin\pyjamas\v6;
  python C:\Pyjamas\v6\bin\ %CMD_LINE_ARGS%

Then, I created a corresponding command for the desktop runs called

  @echo off
  if ""%1""=="""" goto doneSetArgs
  goto setArgs

  set PYTHONPATH=c:\bin\pyjamas\v6;
  python %CMD_LINE_ARGS%


(lkcl: this fix is in latest svn, it'll be in the next release)

I had to fix a problem that lkcl has already corrected. msxml2.dll is
not present on these systems however msxml3.dll is.  So, I edited
pyjamas\v6\pyjd\ and changed

(lkcl: likewise)

There's an issue that lkcl has already corrected that we can sidestep
easily.  This will need to be more thoroughly corrected to run
anything that uses a Timer for it's fine for these samples.  Edit
pyjamas\v6\library\pyjamas\ and delete the line with gobject
in it.


Run helloworld in a browser:
  A. cd examples\helloworld
  B. I create a build.bat in sample directories:

    @echo off
    pyjsbuild.bat --print-statements Hello

  C. Run it: output\Hello.html
     NOTE: Chrome does not run files on the hard drive by default
     The hello world example won't work unless you open using the flag:

Run helloworld from the desktop:
  A. cd examples\helloworld
  B. I create a run.bat in the sample directories:

    @echo off

  C. Run it: run.bat

Run KitchenSink in a browser:
  A. cd examples\kitchensink
  B. I create a build.bat in sample directories:

    @echo off
    pyjsbuild.bat --print-statements KitchenSink

  C. Run it: output\KitchenSink.html

Run KitchenSink from the desktop:
  A. cd examples\kitchensink
  B. Create run.bat just like in helloworld but this time with
  C. Run it: run.bat

Step back in awe and admire the work of a great community! 
Something went wrong with that request. Please try again.