Installation¶
There are two different ways to install and use PySB:
Download and run the virtual machine containing the complete PySB installation. Users wishing to try out PySB, who are unfamiliar with the procedure for installing Python packages or who just want a simpler installation procedure, should choose this option.
OR
Install the necessary software dependencies natively on your computer. Users who are comfortable with installing Python packages and compiling source code should choose this option.
Option 1: The PySB virtual machine¶
For easy installation, we provide a pre-configured virtual machine (VM) running the Ubuntu Linux operating system that comes with all necessary software installed. It also includes other useful software (e.g., Git, IPython, GraphViz, Kappa, OCaml), and has been designed to make getting up-to-date versions of PySB and other required packages easy. The VM will require 2GB of free hard drive space to install, plus an extra 500MB during the download and import process.
In addition to the PySB virtual machine file itself, you’ll need virtualization software to run it, such as Oracle’s free and open-source VirtualBox. The instructions given below are for VirtualBox, but other virtualization software such as VMWare Player (free) or Parallels can also be used. Here’s the installation procedure:
- Download VirtualBox and install it.
- Download the PySB OVA (Open Virtualization Appliance) file. The file is approximately 500MB. Double-click the downloaded .ova file to open it in VirtualBox, if your web browser doesn’t offer to do so.
- VirtualBox will now display the Appliance Import Wizard. Click the “Import” button to continue. Note that the newly created VM will occupy about 2GB of hard drive space. Once the import is complete, you may delete the .ova file.
- In the VirtualBox Manager window, double-click the “PySB demo” entry to launch the VM.
Now you may use the virtual machine to create and work with PySB models. All files created in the VM will be saved on a virtual disk image, and you may shut down the VM and re-launch it later from the VirtualBox Manager without losing your work. If you would like to share files between the VM and your desktop system, see the VirtualBox documentation for instructions.
Option 2: Installing the dependencies yourself¶
Required software¶
These are the minimum requirements needed to simulate a model. The given version
numbers have been explicitly tested, and where a number is followed by a +
we
believe all newer versions will work as well. Older versions may also work but
we haven’t formally tested anything older than what’s listed below.
Python 2.7.x or 3.4+
NumPy 1.6+
SciPy 0.9+
SymPy 0.7+
BioNetGen 2.2.5+ (requires Perl – see Perl requirement below)
Rename the unzipped
BioNetGen-x.y.z
folder to justBioNetGen
and move it into/usr/local/share
(Mac or Linux) orC:\\Program Files
(Windows). If you would like to put it somewhere else, set theBNGPATH
environment variable to the full path to theBioNetGen-x.y.z
folder.Perl 5.8+
Mac and Linux users can use the version of Perl included with their operating system. Windows users should get Strawberry Perl from http://strawberryperl.com/.
Recommended software¶
-
This Python package allows you to plot the results of your simulations. It is not a hard requirement of PySB but many of the example scripts use it.
-
An alternate interactive Python shell, much improved over the standard one.
Kappa 4.0
Kappa is a rule-based modeling tool that can produce several useful model visualizations or perform an agent-based model simulation. PySB optionally interfaces with its KaSim simulator and KaSa static analyzer.
To install Kappa for PySB use, put the
KaSim
executable (and optionallyKaSa
if you have it) in/usr/local/share/KaSim
(Mac or Linux) orC:\\Program Files\\KaSim
(Windows). If you would like to put it somewhere else, set theKAPPAPATH
environment variable to the full path to the folder containing theKaSim
andKaSa
executables. Note that if you have downloaded the official binary build of KaSim, it will be named something likeKaSim_4.0_winxp.exe
orKaSim_4.0_mac_OSX_10.10
. Regardless of where you install it, you will need to rename the file to strip out the version and operating system information so that you have justKaSim.exe
(Windows) orKaSim
(Mac or Linux).