{"id":23389,"library":"cantera","title":"Cantera","description":"Cantera is an open-source suite of tools for problems involving chemical kinetics, thermodynamics, and transport processes. Current version is 3.2.0, released November 2025. Major releases approximately yearly, with minor patches as needed.","status":"active","version":"3.2.0","language":"python","source_language":"en","source_url":"https://github.com/Cantera/cantera","tags":["chemical-kinetics","thermodynamics","combustion","simulation"],"install":[{"cmd":"pip install cantera","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for array handling and scientific computing","package":"numpy","optional":false},{"reason":"Cantera compiled extension requires Python development headers at build time","package":"libpython","optional":true}],"imports":[{"note":"The package is lowercased 'cantera'. 'Cantera' may refer to the old Fortran/Cantera 2.x module name.","wrong":"from Cantera import *","symbol":"cantera","correct":"import cantera as ct"},{"note":"Cantera 3.x dropped XML support. Use .yaml files.","wrong":"gas = ct.Solution('gri30.xml')","symbol":"Solution","correct":"gas = ct.Solution('gri30.yaml')"}],"quickstart":{"code":"import cantera as ct\n\ngas = ct.Solution('gri30.yaml')\ngas.TP = 300, ct.one_atm\nprint('Mole fractions:', gas.X)\n\n# Simple equilibrium\ngas.equilibrate('HP')\nprint('Adiabatic flame T:', gas.T)","lang":"python","description":"Load GRI 3.0 mechanism, set temperature and pressure, and compute chemical equilibrium."},"warnings":[{"fix":"Convert .cti files to .yaml using provided conversion script (cti2yaml) or update paths to use .yaml mechanisms.","message":"Cantera 3.0 removed support for .cti and .xml input files. Only .yaml (or .yml) mechanism files are supported.","severity":"breaking","affected_versions":"3.0.0+"},{"fix":"Replace old-style setters with direct property assignment. See migration guide.","message":"ThermoPhase objects no longer have methods like 'setTemperature' or 'setMoleFractions'. Use property assignment: gas.TP = (T, P); gas.X = composition_dict.","severity":"breaking","affected_versions":"3.0.0+"},{"fix":"Replace ct.importInterface('file.yaml', 'phase_name') with ct.Interface('file.yaml', 'phase_name').","message":"The 'importInterface' function is deprecated and will be removed in Cantera 4.0. Use 'Interface' class directly.","severity":"deprecated","affected_versions":"3.2.0"},{"fix":"Install VC++ Redistributable from Microsoft (see Cantera installation docs).","message":"Cantera on Windows may require Microsoft Visual C++ Redistributable. Missing it leads to 'DLL load failed' errors.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use a precompiled wheel: pip install cantera --only-binary cantera. Or install build tools (Cython, compilers) for source build.","cause":"Cantera compiled extension missing; common when installed as source without proper build prerequisites.","error":"ModuleNotFoundError: No module named 'cantera._cantera'"},{"fix":"Ensure the mechanism file is in YAML format. Convert .cti or .xml using cti2yaml or ck2yaml.","cause":"Attempting to load a YAML file that contains XML remnants or using XML parser on YAML. Cantera 3.x only reads YAML.","error":"RuntimeError: No such thermo XML node: 'NASA'"},{"fix":"Use import cantera as ct then ct.Solution(...). Ensure Cantera >= 2.3.","cause":"Old import style (from cantera import *) or very outdated version (<2.3).","error":"AttributeError: module 'cantera' has no attribute 'Solution'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}