Windows Platform

NOTE about Python 2.6:

For folks using Python 2.6, building on Windows is working much better than before. The binary installers described below won't provide Python 2.6, but anyone trying to use (or write) MIEN extensions on Windows should definitely switch to Python 2.6. See this section

Mien works on Windows, and I am spending some effort to make sure that the GUI components are available to Windows users. Several important features, however, don't work in Windows. These include many of the network computation, optimization, and multithreading features. There is no plan to support those features in Windows. MIEN has been tested primarily on Windows XP, and to a lesser extent on Windows 2000. There is no plan to ever test MIEN on Windows Vista.

Note that I personally don't do any testing or maintenance of the Windows port, so you will need to report bugs in order for me to even know that they exist. I don't even know anyone who has a Windows Vista install, so I can't do testing or offer instructions for Vista. In principal MIEN should work on Vista (and Windows 7), but someone with access to appropriate computers will need to support it.

Performance of the MIEN GUIs on Windows may be noticeably worse then in Linux on the same hardware. This mostly has to do with how often Windows sends GUI event messages. It is not easy to fix, so you will have to live with it. Most users find Windows performance sufficient to use the apps.

To set environment variables in Windows, go to the "System" control panel, select the "advanced" tab, and click "environment variables". Now you can add or edit variables in the resulting form. If you don't already have a variable named "HOME", you can make things a lot smoother by adding one. Ideally, set it to some path name that doesn't contain spaces (although things really ought to work even if you use something like "C:\Documents and Settings\me\ "). Extension blocks will not work if HOME is not set, and some other features of Mien may be buggy.

To run a terminal on Windows XP (or at least, a command prompt), you can press WindowsKey-R to display the "run" dialog (or select "run" from the start menu), and type in cmd.exe as the program to run. XP's command prompt is not a very full featured terminal, but it is still preferable to running MIEN in full GUI mode.

The most critical issue for Windows users is the lack of a C compiler. If you don't intend to use MIEN extension blocks or edit MIEN, you can get along without one by installing the available binaries for Python, wxPython, and Numpy, and the egg version of PyOpenGL.

If you do want to use extension blocks that have compiled code, you will need a C compiler that can build extensions for your Python. The Windows binary (For Python 2.5) from python.org appears to be built with Microsoft Visual Studio 7. I've tested building Python extensions with Visual Studio, and it seems to work fine. The down side is that Visual Studio is quite expensive.

Python 2.6

There is some good news for Windows users in Python 2.6. It is built with MicroSoft Visual Studio 2008 (aka VC++ v 9.0), but the free VC++ 2008 Express Edition compiles Python extensions just fine. At the time of this writing, an installer for VC++ 2008 Express can be found here. This package has a point-and-click installer. If you only want it for building Python extensions customize the install so it doesn't install silverlight and sql server. Installing this will give you a start menu option to launch a VC++ 2008 command prompt. This is the same as the normal Windows command prompt, except that it sets some environment variables for using the VC++ 2008 compiler. If you call python setup.py build commands from this command prompt, they work! Yay! The only downside is that, as of the time of this writing, there is no binary installer for numpy for Python 2.6, but that is not a big problem since the compiler works. You can get the source for numpy and build/install it with python setup.py install. You will need to unpack a tar.gz archive to use the numpy source. Windows doesn't do this natively. I currently use the tar command from msys (for that, but if you want a quicker-to-install or GUIer solution, 7zip ([[h www.7-zip.org ) should work.

There are several free compilers for Windows (e.g. the MinGW compiler). Ideally, you would need to build Python and the other extensions from scratch with this compiler in order to be able to use it to compile new extensions. I have never done this successfully. I have managed to cross-compile some MIEN extensions for the binary distribution of Python using the MinGW free C compiler. It worked, but it wasn't fun or easy. I would have to go work through the process again myself to provide documentation, and I don't think I will do that any time soon. Good luck.

Windows Installer

I don't touch Windows if I can possibly avoid it, but some other kind folks are working on an installer for Windows. AFAIK, it isn't working yet. For now, you can get one of the stand alone binaries built with py2exe. These do not require a previous installation of Python or any extension packages. Some features are not available in the binary builds, but they work OK for testing out the main GUIs.

Binary builds for Windows 32, Macintosh PPC (G5) and Macintosh Intel are available from sourceforge. Download the appropriate "mienapp" file for your arcitecture. For Mac versions, simply open the dmg and drag "Mienapp" to your hard drive, and double click to run it. For the Windows version, run mienappSetup.exe and follow the instructions in the installer.

The Windows (py2exe) installer is currently the easiest method of installing on Windows 32 bit systems.

The binary builds imbed a Python interpreter, so they can use source-based Python extension blocks, even if an up-to-date Python isn't present on the target system. If you want to use C extensions, you will still need a C compiler. Dynamic reloading of extension blocks isn't tested with the binaries, and I expect it won't work.

Some aspects of the GUI are different for the binary apllications, since they do not have a controlling terminal. Text output is displayed to a status widget at the bottom of the GUIs, rather than to the terminal. The python command line, when invoked is dispayed in a PyCrust window, which is less full featured than the iPython command line available with a source install.

 

Last edit: 05/29/09

Index