{"id":21644,"library":"openbabel-wheel","title":"OpenBabel (unofficial wheel distribution)","description":"Unofficial PyPI distribution of OpenBabel (version 3.1.1.23), providing prebuilt wheels for Python ≥3.8. OpenBabel is a chemical toolbox for interconverting chemical file formats, molecular modeling, and cheminformatics. This package is useful when building from source is impractical.","status":"active","version":"3.1.1.23","language":"python","source_language":"en","source_url":"https://github.com/baoilleach/openbabel-wheel","tags":["cheminformatics","chemistry","file format conversion","molecular modeling","openbabel","wheel"],"install":[{"cmd":"pip install openbabel-wheel","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"Common mistake: openbabel is the package name; the module to use is usually its submodules like pybel or openbabel.pybel. But 'import openbabel' works.","wrong":"import openbabel as ob","symbol":"openbabel","correct":"import openbabel"},{"note":"Case sensitivity: class is OBMol, not OBmol. Also must import openbabel module first.","wrong":"from openbabel import OBmol","symbol":"OBMol","correct":"from openbabel import openbabel\nmol = openbabel.OBMol()"}],"quickstart":{"code":"import openbabel\n# Create a molecule\nmol = openbabel.OBMol()\n# Build from SMILES\nconv = openbabel.OBConversion()\nconv.SetInAndOutFormats('smi', 'mol')\nconv.ReadString(mol, 'CCO')\nprint('Formula:', mol.GetFormula())","lang":"python","description":"Basic usage: create an OBMol, read SMILES, print formula."},"warnings":[{"fix":"Use 'from openbabel import pybel' (if pybel is needed) or directly use openbabel.OBMol etc.","message":"The openbabel package is the top-level library. The familiar 'pybel' module is NOT included in this wheel. You must use openbabel.pybel or direct openbabel API.","severity":"gotcha","affected_versions":">=3.1.1.0"},{"fix":"Check migration guides from OpenBabel 2.x to 3.x. Use 'openbabel.openbabel' for low-level functions.","message":"This wheel packages a newer OpenBabel version (3.1.1+) which has breaking changes from the old 'openbabel' package (e.g., removal of certain convenience functions). The official OpenBabel bindings have moved to 'openbabel.openbabel' for the underlying C++ bindings.","severity":"deprecated","affected_versions":">=3.0.0"},{"fix":"Run 'import openbabel; print(openbabel.__file__)' to verify which module is loaded.","message":"On some systems, the wheel may conflict with a system-installed OpenBabel. Ensure no other OpenBabel library is being loaded inadvertently.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run 'pip install openbabel-wheel'. Then use 'import openbabel' (not 'import openbabel-wheel').","cause":"The package is not installed or is installed but named differently.","error":"ImportError: No module named openbabel"},{"fix":"Use 'from openbabel import openbabel' then 'openbabel.OBMol()'.","cause":"You imported the openbabel module but forgot to import its submodule 'openbabel' (the C++ bindings).","error":"AttributeError: module 'openbabel' has no attribute 'OBMol'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}