Hi, Peng, I guess you installed pybel via `pip install pybel`, which is
the "wrong" pybel (https://pypi.python.org/pypi/PyBEL/0.5.4 ) You should
install openbabel and use it's pthon wrapper via `pip install openbabel`
(https://pypi.python.org/pypi/openbabel/2.4.1 ).
Hongbin Yang
From: Peng YuDate: 2017-05-08 09:07To: openbabel-discussSubject: [Open Babel]
How to run readstring in pybel?Hi, I got the following error. Does anybody know
what is wrong? Thanks.
$ cat main.py
#!/usr/bin/env python
import pybel
mymol = pybel.readstring("smi", "CCCC")
print mymol.molwt
$ ./main.py
Traceback (most recent call last):
File "./main.py", line 5, in <module>
mymol = pybel.readstring("smi", "CCCC")
AttributeError: 'module' object has no attribute 'readstring'
--
Regards,
Peng
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss