This document describes installation of the core MIEN package and its dependancies using a manual source-code based install. I think this is the best way to install and use MIEN, but if you would like a quicker or less technical method those are described here.
If you have MIEN installed, and want to add extension blocks, look here.
Most people wanting a source/development install of anything probably know what shells and environment variables are, but if you don't some help is provided here (for terminals), and here (for environment).
I also assume below that you are running just about any OS other than MicroSoft Windows. Windows works differently than just about everything else (including Mac OS X, Linux, Unix, BSD, BeOS, etc) in terms of how command prompts work, how environment variables are set, and how path names are specified. MIEN works on Windows (partially), but many of my instructions don't. I assume if you program on Windows you know how to work around its various idiosyncrasies. Some help specific to Windows is provided on this page .
MIEN is a pure python project, distributed as a single package. Consequently, it is "installed" by placing the package directory somewhere in the PYTHONPATH on your system. MIEN has a number of dependancies that need to be in place first, however. There is also an entry-point executable script which should be in your PATH. If you are familiar with Python, dependancies, and environment variables, you should have no trouble. I will provide a quick overview of the install procedure first, and more detailed help with each step later.
In order to run MIEN from source you will need to take the following steps:
Set up your PATH to call the correct python
numpy >=v1.0 (>=1.3.0 strongly recommended)
You will probably need to configure some environment variables
If you already have an appropriate Python environment, you can skip some of these steps. You can test for installed python and packages from the shell in the following way:
If that process works, you can skip to getting the MIEN code.
Common problems would be:
"-bash: python: command not found", indicating that you don't have python (or it is not in your PATH)
a python versions <2.5, indicating that your Python is too old to run MIEN
"ImportError: No module named numpy (or wx, or OpenGL)" indicating that you don't have the prerequisite python packages installed.
You can get the Python source, or binary installers for your platform, at python.org
Binary Python packages are fine for use with MIEN. Compiled source is great too.
Alternately, you may use a package managers (like synaptic on Ubuntu Linux) to install Python. MIEN has been tested with a Ubuntu apt-based Python, and should also work with most others. BTW: If you use apt, you can install all the dependancies with apt, or even install MIEN itself with apt as discribed here. If you use MacOS, you probably do not want to use fink or MacPorts to install Python, because this will not provide you with a Framework python. See the Macintosh Install Notes.
Once you have Python installed, make sure that your new Python is in your executable path (determined by the environment variable PATH on most systems). When you open up a shell and type "python" you should see python 2.6. If this doesn't happen, add the directory that you just installed python in to the beginning of your PATH. (Help with setting up environment).
If you are planning to use MIEN from an interactive Python prompt, you will definitely want readline support for your Python. Some distributions don't turn readline on by default. The worst case scenario is that you may need to get readline (I use v5.2) first, compile and install that, and use "./configure --with-readline" when building Python. Fortunately, binary packages from python.org have readline included. You can test for readline support from the Python interactive interpreter by typing any command, executing it, and then pressing "up arrow". If the last command you typed is displayed at the prompt, you have readline. If something ugly like "^[" is displayed, you don't. Please don't try to live with an interpreter that doesn't have readline support. It will frustrate you beyond belief (for which you may blame Python, MIEN, or even me :). Spend the time now to get things working right.
Depending on your system, you will want to install the packages wxPython, Numpy, and PyOpenGL either using a binary installer, or python's distutils. My recommendation is to install wxPython using a binary package if at all possible, install Numpy using distutils (unless you are on Windows and lack a compiler), and install PyOpenGL using eggs.
WxPython is available here. Binary installs work well with MIEN, and this extension is the hardest component to build from source. If you do build it from source, I recommend that you follow the instructions from that site rigorously. In particular, build and the wxWidgets source that comes with the particular wxPython source you download (even if you already have wxWidgets installed).
Numpy is the most important package for MIEN (it's actually the only one that you need if you want to run in terminal mode without using any GUIS or graphs). It's also very easy and reliable to build with distutils, so I recommend that you build it (unless you are on Windows). See the platform specific notes about compilers for your platform. If you have a compiler and the python headers installed, just un-archive the source package, open a shell, switch to the new directory, and execute "python setup.py build". If that works, you can now execute "python setup.py install" to copy the extension into your python site packages directory. For this you will probably need to be root (or use "sudo python setup.py install"). Be sure that the "python" you execute when you type these commands is the same python 2.5 that you want to use for running MIEN.
PyOpenGL is used only by the 3D graphing GUIs (predominantly Cellviewer) so it's possible for some users to get along without it. On the other hand, it's now quite easy to install PyOpenGL >3.0 on most major platforms via Python eggs. Unless you already have PEAK's "setuptools" installed, you have to get them first. All you need to do is get ez_setup.py and run "sudo python ez_setuyp.py". Now you can get PyOpenGL (I use the 3.0.0a6 tarball). If you got the tarball, just untar it, switch to the resulting directory, and do a "sudo python setup.py install". That should go fast, and won't even require a compiler (so you can even do it on Windows!)
Optionally, you may want to install iPython. This package provides a nicer interactive interpreter, and MIEN terminal mode will use it if it is available. If you are used to Matlab, and want some features like persistent command history (aka journal), interactive command history search (without pressing ^r), and the ability to type quick shell commands like "cd" and "ls" in the interpreter, you probably want iPython. The install is an easy "untar, cd, sudo python setup.py install", and doesn't require a compiler.
The are a few ways to get the MIEN code
If you have subversion installed, use it.
To get mien core, use svn co http://mien.msu.montana.edu/svn/mien and then also svn co http://mien.msu.montana.edu/svn/mienblocks
If you only want the code, rather than an svn working copy, you can use svn export in place of svn co.
If you don't have subversion, download a source tarball from here. If you have subversion on your system, using svn export http://mien.msu.montana.edu/svn/mien is also a good method (this gets you the latest, though not always the greatest, code).
Once you have a local copy of a directory named "mien", you need to put it somewhere where Python can see it. This is usually a site-packages directory. For example:
Many flavors of Linux: /usr/lib/python2.5/site-packages
Some other flavors of Linux: /usr/local/lib/python2.5/site-packages
You can get a list of places that python looks for packages by doing this:
You can also put mien any where you like, and then tell python where to look by setting the PYTHONPATH environment variable.
Optionally, you may want to add mien/frontends and/or mien/tools to your system PATH. If you do this, you can launch MIEN from the shell just by typing "mien". You can also link or copy mien/frontends/mien to some place in your PATH.
Mien is developed on Mac OS X and tested for full functionality on Linux (we test on Ubuntu and Fedora). A subset of features (including the data visualization GUIs) are periodically tested on Windows XP.
Python is a (mostly) portable language, so MIEN may work on other platforms, but has not been tested there. I suspect that if you can compile python and the prerequisite extensions from source on a platform, you can get MIEN to run. MIEN does use some limitedly available Python libraries (notably "select", which isn't available on Win32 platforms), but features that require these libraries should fail gracefully on non-supporting platforms, leaving many features still functional.
In any case, install documentation is only available for Mac OS X, Linux, and Windows XP. If you want to use MIEN on a more esoteric platform, you will need to find your own way.