I *strongly* recommend contacting the openbabel mailing list rather than me
personally. My e-mail box is horrendous.
In this case, I suspect you either have multiple versions of Python installed,
or the active python is not able to load the _openbabel.so correctly.
I usually see this sort of error when you run one Python binary, but
_openbabel.so is linked against a different libpython.
Others may have other suggestions.
Hope that helps,
-Geoff
> On Feb 26, 2015, at 12:10 PM, Damir Herman <damir.her...@gmail.com> wrote:
>
> Geoff,
>
> I saw you are an active contributor to openbabel so I wanted to ask you a
> question about installation and running of python openbabel bindings on a
> mac.
> <Screen Shot 2015-02-26 at 9.08.01 AM.png>
> I pulled openbabel from repo (details below). When I start python, here is
> what I run into. I googled around, but noone reported this issue so far. Do
> you think you can have a look?
>
> Thanks,
>
> --Damir
>
> Python 2.7.9 (default, Jan 7 2015, 11:49:12)
> [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import openbabel
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/usr/local/lib/python2.7/site-packages/openbabel.py", line 1727
> def OBPlugin_List(PluginID, param=None, os):
> SyntaxError: non-default argument follows default argument
> >>>
>
> In /usr/local/lib/python2.7/site-packages/openbabel.py, line 1727 I have
>
> 1726
> 1727 def OBPlugin_List(PluginID, param=None, os):
> 1728 return _openbabel.OBPlugin_List(PluginID, param, os)
> 1729 OBPlugin_List = _openbabel.OBPlugin_List
> 1730
>
> If I replace the line 1727 with
>
> def OBPlugin_List(PluginID, os, param=None):
>
> when I import openbabel I get:
>
> >>> import openbabel
> Fatal Python error: PyThreadState_Get: no current thread
> Abort trap: 6
>
>
> =================
> tl;dr
>
>
> cd var
> git clone https://github.com/openbabel/openbabel.git
> <https://github.com/openbabel/openbabel.git>
> mkdir build
> cd build
> cmake -DBUILD_GUI=ON -DPYTHON_BINDINGS=ON -DRUN_SWIG=ON ../openbabel
> output of cmake in cmake.out
> make -j8
> make.out and make.err attached
> sudo make install
> install.out attached
>
> Openbabel command line utilities installed:
>
> obabel -V
> Open Babel 2.3.90 -- Feb 26 2015 -- 08:58:33
>
>
> <cmake.out><make.out><make.err><install.out>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss