In a previous post, I presented Infer.NET, a library for Bayesian networks (a.k.a probabilistic graphical models) inference on the .NET platform by Microsoft Research. In that post, I wrote that I installed Infer.NET (and .NET and IronPython) on Windows 7 running in VMWare. If you don’t have Windows, you can install them on Linux (and probably Mac OS). Today, I managed to install them on Linux on my work machine, and tested several examples successfully. Below are the steps:
- I used Ubuntu 10.10. However, on other Linux/UNIX distros and on Mac OS, the steps should be similar.
- First, install IronPython. The easiest way is to use Synaptics, which will install mono (a free implementation of .NET framework) as dependencies of IronPython. If you install IronPython manually, you must install mono before it.
- Second, install Wine. Again, the easiest way is to use Synaptics.
- Download Infer.NET from its website. It’s a MSI package (Microsoft Installer).
- Open the console, change to the directory where you saved the MSI package, and execute:
msiexec /i <the package.msi>
Follow the instructions to install Infer.NET into your system. If the installation fails, you are out of luck.
- If Infer.NET has been installed successfully into your system, it should now appear in the Wine menu. To try it, start IronPython (ipy) and run some example. Note that the path in:
sys.path.append(r'C:\Path\to\your\Infer.NET\bin\Release')
should be something like
"~/.wine/dosdevices/c:/Program Files/Microsoft Research/Infer.NET 2.4 Beta/bin/Release"
Pingback: Programming Bayesian Networks with Infer.NET and Python | Truong's Weblog