>>> from libsbml import *
> runs into the error
>>> Fatal Python error: Interpreter not initialized (version mismatch?)
that error indicates that you are not running with the python interpreter bundled with OSX lion. Which is:
and on my machine /usr/bin/python.
This is what we created the binaries for. If you want to use a different interpreter you will have to compile the python bindings manually.
> Could this be because libsbml.py and libsbml.pyc aren't in the
> site-packages folder?
No, these files are not needed. They are there in the form of libsbm/__init__.py which will be loaded when importing libsbml with the site-package path set.
I hope this helps
> On 24/12/2011 01:28, Frank T. Bergmann wrote:
>> Hello Kieran …
>> it should be simpler than all that, the DMG installer for lion
>> contains the binaries. They are installed by default into
>> so running:
>> $ PYTHONPATH=/usr/local/lib/python2.7/site-packages/ python Python
>> 2.7.1 (r271:86832, Jun 16 2011, 16:59:05) [GCC 4.2.1 (Based on Apple
>> Inc. build 5658) (LLVM build 2335.15.00)] on darwin Type "help",
>> "copyright", "credits" or "license" for more information.
>>>>> from libsbml import * print getLibSBMLDottedVersion()
>> would be all that is needed. These binaries are also universal:
>> file python2.7/site-packages/libsbml/_libsbml.so
>> python2.7/site-packages/libsbml/_libsbml.so: Mach-O universal binary
>> with 2 architectures python2.7/site-packages/libsbml/_libsbml.so (for
>> architecture i386): Mach-O bundle i386
>> python2.7/site-packages/libsbml/_libsbml.so (for architecture
>> x86_64): Mach-O 64-bit bundle x86_64
>> so they include the 32 and 64bit bindings. So is the default python
>> on OSX:
>> $ file `which python` /usr/bin/python: Mach-O universal binary with 2
>> architectures /usr/bin/python (for architecture x86_64): Mach-O
>> 64-bit executable x86_64 /usr/bin/python (for architecture i386):
>> Mach-O executable i386
>> So you simply switch it to 64 / 32 bit mode as needed with an
>> environment variable:
>> to force 64bit mode or yes for 32bit mode.
>> When you want to compile it yourself on osx it is sufficient to
>> compile with:
>> ./configure --with-python --enable-universal-binaries=yes
>> best Frank
>> On Dec 23, 2011, at 5:13 PM, kieran wrote:
>>> Hello all,
>>> I've decided to give python a go, but have been having real
>>> problems getting it to speak to libSBML. All problems below may
>>> just be my being a python newb, but thought I should ask.
>>> I installed enthought (on my Mac OSX lion), a 64 bit python
>>> package located by default at
>>> After installing the stable 5.3.0 binary, I followed the
>>> instructions, changing ~/.bashprofile to include the line export
>>> PYTHONPATH=/usr/local/lib/python2.7/site-packages and the
>>> permissions of all files located there. However, typing
>>>> from libsbml import *
>>>> Fatal Python error: Interpreter not initialized (version
>>> Further investigation revealed that the .py and .pyc files were
>>> missing, with __init__.py/c in their place.
>>> So I decided to try the experimental binary instead. This time the
>>> error was
>>>> ImportError: No module named libsbml
>>> and I saw that the file libsbml.pyc was missing.
>>> Finally, I decided to try compiling the (stable) source with
>>> but I ran into the same problems (error and wrongly named files) as
>>> when using the stable binary.
>>> Any ideas what I'm doing wrong?
>>> Cheers, k
>>> -- kieran smallbone email@example.com
>>> manchester centre for integrative systems biology manchester
>>> interdisciplinary biocentre 131 princess street manchester m1 7dn.
>>> uk ____________________________________________________________ To
>>> manage your libsbml-development list subscription, visit
>>> For a web interface to the libsbml-development mailing list, visit
>>> For questions or feedback about the libsbml-development list,
>>> contact firstname.lastname@example.org
>> ____________________________________________________________ To
>> manage your libsbml-development list subscription, visit
>> For a web interface to the libsbml-development mailing list, visit
>> For questions or feedback about the libsbml-development list, contact
> kieran smallbone
> manchester centre for integrative systems biology
> manchester interdisciplinary biocentre
> 131 princess street
> manchester m1 7dn. uk
> To manage your libsbml-development list subscription, visit
> For a web interface to the libsbml-development mailing list, visit
> For questions or feedback about the libsbml-development list,
> contact email@example.com
To manage your libsbml-development list subscription, visit
For a web interface to the libsbml-development mailing list, visit
For questions or feedback about the libsbml-development list,