{"id":52,"date":"2013-04-08T12:51:28","date_gmt":"2013-04-08T09:51:28","guid":{"rendered":"http:\/\/mednis.info\/wp\/?p=52"},"modified":"2013-05-17T09:35:15","modified_gmt":"2013-05-17T06:35:15","slug":"installing-libsbml-with-python-support-on-debian-wheezy","status":"publish","type":"post","link":"http:\/\/mednis.info\/wp\/?p=52","title":{"rendered":"Installing libsbml with python support on Debian wheezy"},"content":{"rendered":"<p>Installing libSBML on Debian begins the same way as on Ubuntu. First follow the instructions in <a href=\"http:\/\/mednis.info\/wp\/?p=5\" title=\"How to install libSBML in Ubuntu 12.04 with Python bindings\">this post<\/a>.<\/p>\n<p>After compiling and installing, libsbml on Ubuntu should be working. <\/p>\n<p>In Debian, if you try to import libsbml, you get the following error:<br \/>\n<code>File \"<stdin>\", line 1, in <module><br \/>\nFile \"\/usr\/local\/lib\/python2.7\/dist-packages\/libsbml\/__init__.py\", line 27, in <module><br \/>\n  _libsbml = swig_import_helper()<br \/>\nFile \"\/usr\/local\/lib\/python2.7\/dist-packages\/libsbml\/__init__.py\", line 23, in swig_import_helper<br \/>\n  _mod = imp.load_module('_libsbml', fp, pathname, description)<br \/>\nImportError: libsbml.so.5: cannot open shared object file: No such file or directory<br \/>\n<\/code><\/p>\n<p>To get it working you have to set PYTHONPATH variable:<br \/>\nIn commandline:<br \/>\n<code>export PYTHONPATH=\/usr\/local\/lib\/python2.7\/dist-packages\/libsbml<\/code><\/p>\n<p>It is also possible to modify environment variable from within python code:<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","protected":false},"excerpt":{"rendered":"<p>Installing libSBML on Debian begins the same way as on Ubuntu. First follow the instructions in this post. After compiling and installing, libsbml on Ubuntu should be working. In Debian, if you try to import libsbml, you get the following error: File &#8220;&#8221;, line 1, in File &#8220;\/usr\/local\/lib\/python2.7\/dist-packages\/libsbml\/__init__.py&#8221;, line 27, in _libsbml = swig_import_helper() File &hellip; <a href=\"http:\/\/mednis.info\/wp\/?p=52\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Installing libsbml with python support on Debian wheezy<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/mednis.info\/wp\/index.php?rest_route=\/wp\/v2\/posts\/52"}],"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=52"}],"version-history":[{"count":5,"href":"http:\/\/mednis.info\/wp\/index.php?rest_route=\/wp\/v2\/posts\/52\/revisions"}],"predecessor-version":[{"id":54,"href":"http:\/\/mednis.info\/wp\/index.php?rest_route=\/wp\/v2\/posts\/52\/revisions\/54"}],"wp:attachment":[{"href":"http:\/\/mednis.info\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=52"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/mednis.info\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=52"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/mednis.info\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=52"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}