Running the Python/PyGTK GUI on Windows

Jump to: navigation, search

The PyGTK GUI for ASCEND also runs on Windows, although you will probably find the list of prerequisites a little irritating at this stage. This page outlines the steps required to get it running, at least until we work out a better way to package all the various dependencies etc.

Text here has been moved to Building ASCEND.


SCons is the preferred build tool for ASCEND, because of its ability to support non-POSIX compilers on Windows, as well as all the usual suspects on unixy systems.

Install SCons using the downloadable installer. Be sure to use SCons-0.96.92 or later.

Getting the ASCEND source code

I used TortoiseSVN to get the source code from the repository. I set the location for the data to c:\msys\1.0\home\john\ascend

See VersionManagement for the details of what URL to use to access our repository.



The PyGTK GUI requires a wrapper DLL (_ascpy.dll) to handling interfacing ASCEND with the Python language. It also requires the 'core' ASCEND DLL (ascend.dll) containing the compiler and solver engine. This latter is shared with the Tcl/Tk interface. To build these, we recommend using SCons via the MSYS command line (doubleclick the new, big, blue 'M' icon on your desktop).

First change to the directory where you put the sources, and set up your PATH:

  • cd ~/ascend
  • export PATH=/mingw/bin:/bin:/c/Program\ Files/GnuWin32/bin:/c/Python24:/c/Python24/Scripts:/c/GTK/bin:/e/swigwin-1.3.29/:/c/Tcl/bin/:${PATH}

Now, launch SCons:

  • scons

This should build the complete PyGTK interface. If all goes well, this should result in a file ascend.dll in ~/ascend and a file _ascpy.dll in ~/ascend/pygtk.

Runtime prerequisites

Please see Prerequisites for Windows. We are in the process of reorganising this content.


To run ASCEND, assuming you have installed all of the runtime prerequisites, you can use your MSYS commandline and type:

  • cd ~/ascend/pygtk
  • export ASC_DEV=1
  • ./ascend

Note that there are a number of environment variables that affect how ASCEND runs.

Please let us know of any bugs with this under the 'pygtk-gui' section of the bug tracker.

In particular, it looks like some of the plotting functionality, incidence matrix, and 'diagnose' window are liable to crash. Normal solving seems fine. We are chasing these issues down with the GTK+ windows porters.

You may also experience different results depending on whether you run from the MSYS commandline as opposed to the Window 'cmd' console: under these two environment file paths are sometimes treated differently.


There is a windows installer that can be created using the NSIS tool. Once NSIS is installed, follow the above instructions but replace the 'scons' command with 'scons installer'. The installer file ascend-NNNNN.exe should appear in the pygtk subdirectory. Here, NNNNN is a version number specified in the SConstruct file. The installer doesn't currently include the various prerequisites; these will need to be installed on your system before the installed version of ASCEND will sstart up correctly. We propose to add some logic to the installer warning about missing components, but this has yet to be done.

Note: NSIS does not need to be in your path, because the NSIS Builder (scons/ uses the Windows registry to locate makensis.exe. Only where the registry key cannot be found does the NSIS Builder look in your PATH.

See also [1] for info on how it should be possible to build the Windows installer from Linux