{"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,"search_vec":"'2025':26 '3.2.0':23 'approxim':29 'cantera':1,2 'chemic':14,37 'chemical-kinet':36 'combust':40 'current':20 'involv':13 'kinet':15,38 'major':27 'minor':32 'need':35 'novemb':25 'open':6 'open-sourc':5 'patch':33 'problem':12 'process':19 'releas':24,28 'simul':41 'sourc':7 'suit':8 'thermodynam':16,39 'tool':10 'transport':18 'version':21 'year':30","created_at":"2026-05-01T08:07:31.061267+00:00","updated_at":"2026-05-01T08:07:31.061267+00:00","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,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"3.2.0","cli_name":"cantera","cli_version":"sh: 1: cantera: not found","type":"library","homepage":"https://cantera.org","github":"https://github.com/Cantera/cantera","docs":"https://cantera.org/stable/reference","changelog":null,"pypi":"https://pypi.org/project/cantera/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["data","ai-ml"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}