Patrick, thanks for pointing me in the right direction. I did have to
slightly modify cmake command. This is what I did starting with fresh
anaconda install:


conda install cmake lxml swig
cmake ../openbabel-2.3.2 -DPYTHON_BINDINGS=ON -DRUN_SWIG=ON
-DCMAKE_INSTALL_PREFIX=~/anaconda
-DPYTHON_INCLUDE_DIR=~/anaconda/include/python2.7
-DCMAKE_LIBRARY_PATH=~/anaconda/lib
-DSWIG_DIR=~/anaconda/share/swig/3.0.2/
-DSWIG_EXECUTABLE=~/anaconda/bin/swig
-DPYTHON_LIBRARY=~/anaconda/lib/libpython2.7.so
make
make install
mv ~/anaconda/lib/_openbabel.so ~/anaconda/lib/openbabel.py
~/anaconda/lib/pybel.py ~/anaconda/lib/python2.7/site-packages/

Cheers,
Samo
​

On Mon, Jan 12, 2015 at 12:40 AM, Geoffrey Hutchison <
geoff.hutchi...@gmail.com> wrote:

> Has anybody successfully compiled openbabel with python bindings that work
> with Anaconda <https://store.continuum.io/cshop/anaconda/> python
> distribution (python 2.6)?
>
>
> Sure, there's no problem. You just need to make sure that Cmake is picking
> up the correct python and python libraries before you compile.
>
> I use Open Babel python and Pybel all the time with Anaconda.
>
> -Geoff
>
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
vanity: www.gigenet.com
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to