libSBML C++ API  5.11.0
Downloading libSBML

To begin, please use the following table to find the appropriate instructions for your situation:

1. If you use C, C++, C#, Java, MATLAB, Perl or Ruby

The installation packages in the libSBML SourceForge download site contain interfaces for C, C++, C#, Java, MATLAB, Perl, Python, and Ruby in the same package. (However, there are better ways to get the Python interface, as explained below.) The download area has two subdirectories: one for stable releases of libSBML, and one for experimental releases. The stable releases contain support for only the accepted parts of SBML, while the experimental releases contain code for SBML Level 3 packages still in development.

Image of SourceForge download page for libSBML

Screenshot of the SourceForge download page for libSBML.

Click on either stable or experimental, and then navigate to a subdirectory matching your operating system platform. Download the appropriate installer or package file for your platform, and use the appropriate platform-specific approach to install the software. (E.g., if you downloaded a Mac .dmg file, double-click the file in the Mac Finder to mount the disk image, open the image contents in the Finder, and finally, double-click the .pkg file contained inside.)

2. If you only use Python

We provide three easy options for obtaining the libSBML Python interface: (1) packages available from the Python Package Index (PyPI), to be used with pip, (2) for Linux only, installers for use with the standard operating system installation tools such as yum and apt-get, and (3) for Windows only, standalone Windows installers. The following paragraphs provide more information about each.

2.1 Using PiPI

If you have pip installed on your Windows, Mac OS X or Linux system, you can use it to install the latest releases of libSBML. First, make sure you have installed the following prerequisite software packages on your operating system: python-dev, libxml2-dev, libz-dev, and libbz2-dev. (Those are for Linux; for other operating systems, please find the appropriate software distributions.) Then, to get the stable release of libSBML, execute the following command:

sudo pip install python-libsbml

For the experimental release of libSBML, use the following command instead:

sudo pip install python-libsbml-experimental

If all goes well, the command above should result in pip printing many messages while it builds libSBML on your computer, ultimately ending in the following message to tell you it finished successfully:

[... much text omitted ...]
Successfully installed python-libsbml
Cleaning up...

After this, you should be able to access the Python language interface for libSBML on your computer directly from your Python interpreter by importing it like any other Python module. In other words, import libsbml should work when typed into your Python interpreter.

2.2 Using Linux's apt-get and yum together with online repositories

If you are running Linux, and you prefer to use the standard over-the-air installation tools provided by your operating system (e.g., yum and apt-get), you can take advantage of binary packages we provide using the OpenSUSE Build System (OBS) for many different flavors of Linux including CentOS, Fedora, Ubuntu, and others:

As an example, the following is a screenshot of the page currently found at the python-libsbml page. From this page, clicking on the name of an operating system will display the instructions for what to do:

Image of the OBS page Python stable installers

Screenshot of the OBS python-libsbml page for different Linux systems.

After following the instructions to install the appropriate binary distribution on your computer, you should be able to access the Python language interface for libSBML on your computer directly from your Python interpreter. In other words, import libsbml should work when typed into your Python interpreter.

2.3 Using the Windows libSBML installer for Python

If you are running Windows, you can take advantage of executable installers that we make available for that platform. They can be found in a subdirectory named python within each of the Windows subdirectories (stable and experimental) in the libSBML area on SourceForge. There are different installers for different versions of Python. The following screenshot shows an example.

Image of SourceForge download page for the Windows libSBML installers

Screenshot of the SourceForge download page for the Windows libSBML installers.

After you download an appropriate .exe file for your system, run the installer. The installer will lead you through the installation process.

3. If you only use R

We provide installers for the libSBML R language interface for Linux, Mac OS X and Windows. You can download the installer archive file from the SourceForge download page mentioned below. This file will have a name of the form libSBML_5.11.0.tgz on Mac OS X, libSBML_5.11.0.zip on Windows, and libSBML_5.11.0_R_i686-pc-linux-gnu.tar.gz or libSBML_5.11.0_R_x86_64-pc-linux-gnu.tar.gz on Linux systems.

Once you have downloaded the appropriate version of the installer for your operating system, one more step is required to install the libSBML R interface. You can do this step in one of two ways: either using the R graphical interface, or using a terminal/shell command. These approaches are explained below.

3.1 Using the R GUI

From the R menu "Packages" or "Packages & Data" (depending on your operating system), select the "Package Installer" item. You will be presented with an interface that lets you install a local binary package. Use that interface to navigate to the directory where you copied the libSBML archive file, and select the archive file for installation.

3.1 Using a shell command

Suppose that the path to the libSBML R archive on your computer is archive. Execute the following command in a terminal/shell window (note: not in the R command line interpreter!):

R CMD INSTALL archive

If all goes well, you should see R print messages such as the following (the paths on your computer may differ):

* installing to library '/Library/Frameworks/R.framework/Versions/3.1/Resources/library'
* installing *binary* package 'libSBML' ...
* DONE (libSBML) 

In the command above, R is the executable for the command-line version of R. We assume it is accessible from your shell's command line, but if it is not accessible by simply typingR, you may need to supply the full path to R.

4. If you want to build from sources

If you need to use Octave, or no installation package is available for your particular platform, or you have special requirements for libSBML's configuration, you can always build libSBML from sources. The process for doing that is the topic a separate section, Building and installing libSBML .