28 August 2014

Installing libSBML Python bindings on Ubuntu 14.04 LTS

Now that Ubuntu 14.04 has been around a bit now and I have started upgrading my development machines.

One of the first things that always gets installed is the libSBML and its Python bindings which then gives me access to the best library for reading/writing/manipulating Systems Biology Markup Language (SBML) files out there and is critical for my work.

Thanks to the fantastic work done by the development team installation is this easy:

# Python development packages and Pip install system
sudo apt-get install python-dev python-pip

# libSBML dependencies and development libraries
sudo apt-get install libxml2 libxml2-dev
sudo apt-get install zlib1g zlib1g-dev
sudo apt-get install bzip2 libbz2-dev

# libSBML
sudo pip install python-libsbml

That's it, happy modelling (please look up the above packages, before installing them, if you don't know what they are)!


  1. Hi ! just a quick question right on spot: after doing this I have a py script whose author has put the following line:

    from libsbml import *

    therefore, after installing python-libsbml as you suggest (I didn't install the dependencies, but I guess that should show up in another way, if troublesome),
    I still get:
    ImportError: No module named libsbml

    If I modify the script to:
    from python-libsbml import *

    I get:
    from python-libsbml import *
    SyntaxError: invalid syntax

    Same behaviour if I just try to import python-libsbml or import libsml

    Any Ideas ??
    Thanks In advance ! and best regards

    Claudio (a great fan of your flux network module related work, and FAME user)

  2. This was really helpful ! Thanks for posting this !


    (Please ignore my previous comment [except for the part I like your work on modularization], I'm already on my way to using the library )

  3. Hi Claudio

    Glad this helped. Let me know if you have any other questions regarding the enumeration pipelines etc.