{"id":68,"date":"2013-04-30T10:09:03","date_gmt":"2013-04-30T07:09:03","guid":{"rendered":"http:\/\/mednis.info\/wp\/?p=68"},"modified":"2013-07-04T17:25:56","modified_gmt":"2013-07-04T14:25:56","slug":"how-to-install-libsbml-in-fedora-18-with-python-bindings","status":"publish","type":"post","link":"http:\/\/mednis.info\/wp\/?p=68","title":{"rendered":"How to install libSBML in Fedora 18 with Python bindings"},"content":{"rendered":"<p><strong>Install compiler<\/strong><br \/>\n<code>yum install gcc-c++<br \/>\nyum groupinstall \"Development Tools\"<\/code><\/p>\n<p><strong>Install some additional packages if needed<\/strong><br \/>\n<code>yum install python-devel<br \/>\nyum install libxml2-devel<br \/>\nyum install swig<\/code><\/p>\n<p><strong>Compile and install libSBML<\/strong><br \/>\nGo to the directory where you have exctracted libsbml source and run these 3 commands<br \/>\n<code>.\/configure --with-python<br \/>\nmake<br \/>\nmake install<\/code><\/p>\n<p><strong>Make libsbml accessible to Python<\/strong><br \/>\n<code>export PYTHONPATH=\/usr\/local\/lib64\/python2.7\/site-packages\/libsbml<\/code><br \/>\nOr fix the path right from your python script<br \/>\n<code>import sys<br \/>\nsys.path.append('\/usr\/local\/lib64\/python2.7\/site-packages\/libsbml')<\/code><\/p>\n<p>You can get and set environment variables via os.environ:<br \/>\n<code>import os<br \/>\nos.environ['PYTHONPATH'] = '\/usr\/local\/lib\/python2.7\/dist-packages\/libsbml'<\/code><br \/>\nBut since your interpreter already runs, this will have no effect.<\/p>\n<p>For whatever reason, in Fedora the library file is _libsbml, not libsml. To use libsbml in Fedora import it like this:<br \/>\n<code>import _libsbml<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Install compiler yum install gcc-c++ yum groupinstall &#8220;Development Tools&#8221; Install some additional packages if needed yum install python-devel yum install libxml2-devel yum install swig Compile and install libSBML Go to the directory where you have exctracted libsbml source and run these 3 commands .\/configure &#8211;with-python make make install Make libsbml accessible to Python export PYTHONPATH=\/usr\/local\/lib64\/python2.7\/site-packages\/libsbml &hellip; <a href=\"http:\/\/mednis.info\/wp\/?p=68\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">How to install libSBML in Fedora 18 with Python bindings<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[10,4],"tags":[],"_links":{"self":[{"href":"http:\/\/mednis.info\/wp\/index.php?rest_route=\/wp\/v2\/posts\/68"}],"collection":[{"href":"http:\/\/mednis.info\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/mednis.info\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/mednis.info\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/mednis.info\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=68"}],"version-history":[{"count":5,"href":"http:\/\/mednis.info\/wp\/index.php?rest_route=\/wp\/v2\/posts\/68\/revisions"}],"predecessor-version":[{"id":107,"href":"http:\/\/mednis.info\/wp\/index.php?rest_route=\/wp\/v2\/posts\/68\/revisions\/107"}],"wp:attachment":[{"href":"http:\/\/mednis.info\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=68"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/mednis.info\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=68"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/mednis.info\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}