Hi Sanjan, Since you've already have (Ana)conda, the easiest solution whould be installing it via conda:
"conda install -c openbabel openbabel" ---- Pozdrawiam, | Best regards, Maciek Wójcikowski mac...@wojcikowski.pl 2016-11-30 3:46 GMT+01:00 tpsanjan <tpsan...@gmail.com>: > Hi, > > I have been trying install python bindings for openbabel 2.4.1 on > Ubunut16.04 with python 3.5.2 (installed via Anaconda) but haven't been > able > to get it working. Here's what I have tried so far: > > Based on David Hall's post in this thread: > > $ git clone https://github.com/openbabel/openbabel.git > $ cd openbabel > $ mkdir build > $ cd build > $ cmake .. -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_BINDINGS=ON > -DRUN_SWIG=ON > $ grep '^PYTHON' CMakeCache.txt > > And then followed the steps given on openbabel docs > (https://open-babel.readthedocs.io/en/latest/Installation/install.html# > compile-bindings) > > $ cmake ../openbabel-2.3.2 -DPYTHON_BINDINGS=ON > $ make > # make install > $ export PYTHONPATH=/usr/local/lib:$PYTHONPATH > > All commands seemed to run smoothly (python3-dev is installed). But when I > use python shell through terminal: > > sgupta78@sgupta78:~$ python > imPython 3.5.2 |Anaconda 4.1.1 (64-bit)| (default, Jul 2 2016, 17:53:06) > [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux > Type "help", "copyright", "credits" or "license" for more information. > >>> import openbabel > >>> mol = openbabel.OBMol() > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > AttributeError: module 'openbabel' has no attribute 'OBMol' > > import openbabel was successful *but none of the functions in openbabel > module are being recognized*. As shown above it's raising AttributeError. > Is > there something that I missed during installation steps shown above? > > Secondly, when I ran a simple script [just to test OBMol() ] stored in a > sub-folder of home directory, *even the import openbabel failed*. This > possibly means that the environment variables haven't been set. I assumed > that cmake and export steps above possibly take care of it. > > Any help would be appreciated. > > Thanks, > Sanjan > > > > > > > > -- > View this message in context: http://forums.openbabel.org/ > OpenBabel-for-Python-3-tp4659432p4659622.html > Sent from the General discussion mailing list archive at Nabble.com. > > ------------------------------------------------------------ > ------------------ > _______________________________________________ > OpenBabel-discuss mailing list > OpenBabel-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss >
------------------------------------------------------------------------------
_______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss