I spent a long time trying to get IronPython2 running on Mono. Now IronPython1 ships with Ubuntu, so
apt-get install ironpython, if that's all that you want. Ironically, I don't really know the difference between IronPython1 and IronPython2, but "2 has got to be better than 1", right?
The good news is that its very possible, but you will have to step out of your comfort zones.
You will need:
Mono 2.4 (sources) and IronPython 2.0.1 (binary)
First build Mono (note that you need Ubuntu's Mono to bootstrap, so
apt-get install mono) but make sure you put it somewhere special so it doesn't mess with the system-installed Mono. This advice is taken from an article on the Mono wiki.
$ tar xvjf mono-2.4.tar.bz2
$ cd mono
$ mkdir -p ~/opt/mono
$ ./configure --prefix=~/opt/mono
$ make && make install
So this is putting Mono in opt/mono in my home directory (which is where I like to put things, but you might like them somewhere else, like /opt).
Then you will need to write a script. Again modified from the link above.
PS1="[mono] \w @ "
You will source this script to mutate your environment so you can use your nice new Mono, so say you saved it as ~/mono-2.4-env-activate.sh:
And it will do its busines and change your prompt so you know it:
[mono] ~ @
And once you have that you can test it:
[mono] ~ @ which mono
[mono] ~ @ mono --version
Mono JIT compiler version 2.4 (tarball Sat May 23 01:13:11 BST 2009)
And once you are happy it works, you just need to execute the IronPython2 executable.
[mono] ~/tmp @ unzip IronPython-2.0.1-Bin.zip
[mono] ~/tmp @ cd IronPython-2.0.1/
[mono] ~/tmp/IronPython-2.0.1 @ mono ipy.exe
IronPython 2.0 (126.96.36.199) on .NET 2.0.50727.1433
Type "help", "copyright", "credits" or "license" for more information.
Looking good! And before you kill yourself trying to exit (it wants
Control-zwhich is going to be fairly impossible):
>>> import sys
[mono] ~/tmp/IronPython-2.0.1 @
And there you have it. I am not sure exactly how I feel about IronPython on Mono, but it can't be a bad thing that it works. I will be investigating it more in the near future, so I may document what I am learning.