Dear all,

I am using openbabel 2.4.1 (with python building) on OS X Yosemite 10.10.5
and python 2.7.10.
I have successfully installed openbabel using homebrew, and checked pybel
module was correctly imported in python without any error.
Then, I tried to run the following python script ( to test pybel
module properly works.

import pybel
mol = pybel.OBMol()
conv = pybel.OBConversion()
print mol.NumAtoms()
print mol.NumAtoms()

but when I tried to run this script I got the attribute error as follows.

Traceback (most recent call last):
  File "/Users/kohseitsuji/Desktop/", line 2, in <module>
    mol = pybel.OBMol()
AttributeError: 'module' object has no attribute 'OBMol'

I’m not sure why this error happens since I could import the pybel module in

How can I fix this error?  Any help would be highly appreciated.

Thank you

View this message in context:
Sent from the General discussion mailing list archive at

Check out the vibrant tech community on one of the world's most
engaging tech sites,!
OpenBabel-discuss mailing list

Reply via email to