Skip to content

Installation

Ayush Pandey edited this page Dec 5, 2018 · 5 revisions

Installation Steps:

Python Installation (skip if you already have Python)

  1. (For Windows) Download Python 3.6 from this link if you have a Windows 64 bit machine. Use this link for 32 bit installation.

Note : If the installation fails, make sure that your Windows OS has the lastest updates from Microsoft. You would also need Microsoft Runtime C environment to use Python, that is, have the latest Visual Studio distribution installed on your system. Refer to this [link] for more information.

Python comes preinstalled with macOS and linux. However, if you wish to update to the latest Python release, go to this link.

Note 2: libSBML is still in experimental phase with Python 3.7, so it is recommended that you have Python 3.6. However, for the purposes of using subsbml, it might as well work with 3.7, so if you are already on 3.7 maybe you can give it a try without downgrading to 3.6, but if you are installing afresh then go with 3.6 stable release for Python.

  1. Add Python to PATH environment variable. An online tutorial to do this in Windows OS is available here.

Note 3: You might need to install Python as a framework for macOS (do this only if you face some problem running Python code). With Anaconda, you would need to install python.app and then use pythonw to run all scripts.

conda install python.app
pythonw filename.py 

SBML installation (skip if you already have python-libsbml)

  1. Install python-libsbml. Follow steps given on this link. If you have Python PyPI installed and added to environment variables of your machine, then simply running pip install python-libsbml should work and install the latest stable libsbml version.

Sub-SBML installation

  1. Clone the Github repository of subsbml. If you have git installed, then simply run git clone https://github.com/BuildACell/subsbml.git from the directory where you want to install subsbml. If not, download a zip of the repository using this download link and simply extract to the directory where you want to install subsbml.

  2. cd to the subsbml installed folder from the above step. From this directory, run pip install . or python setup.py install if pip is not installed. This will install the subsbml package and add it to the packages path for your Python (in site-packages).

Dependencies

To install all (and some extra, but useful) dependencies, simply run python -m pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose. However, if you prefer to install each dependency separately and only the mandatory ones then install the following

  1. numpy - Mandatory. To install run pip install numpy.
  2. matplotlib - Mandatory. To install run pip install matplotlib.
  3. ipython and jupyter - Needed to run the examples ipython notebooks available on Wiki. To install run pip install ipython, and pip install jupyter.

(If you don't have Python PyPI, go to this link for numpy source distributions and other ways to install it on your machine and this link for help with jupyter installation.)

Simulator (Optional)

Although, most of subsbml features concern with composing SBML files but it also provides some additional but optional features for simulation of the SBML files. Currently, there are three simulator modes supported and to use any of them you need to install the simulator externally. The following steps will point you towards the required steps:

  1. RoadRunner - Deterministic simulations - A fast SBML simulator that has full SBML support. Go to this link to install.
  2. bioscrape - Deterministic simulations - Go to this link to install.
  3. bioscrape - Stochastic simulations - Refer to the documentation to learn how to run stochastic simulations using bioscrape
  4. COPASI (deterministic and stochastic simulations) - Support with subsbml coming soon!

Get Started

You are now ready to use subsbml! Just write from subsbml import * in whatever Python file you want to use the package features. Head on over to the Wiki/Usage to refer to some common usage examples for the package.

Help and support

Please feel free to create issues on the Github repository if you face any issues in installation or in using this package. You may also reach out to Prof. Richard Murray for any feedback/suggestions.