Registry / data / cantera

cantera

JSON →
library3.2.0pypypi✓ verified 88d ago

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.

pip install cantera
INSTALL
IMPORT
SIG · CANTERA
C
cantera
datapythonv3.2.0
Install
5.0s avg
Import
376ms
Disk
149MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v3.2.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
build_error
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 5.0s · import 0.376s · 147MB
149MB installed
● package 149MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

cantera
✓ import cantera as ct
✗ from Cantera import *
The package is lowercased 'cantera'. 'Cantera' may refer to the old Fortran/Cantera 2.x module name.
Solution
✓ gas = ct.Solution('gri30.yaml')
✗ gas = ct.Solution('gri30.xml')
Cantera 3.x dropped XML support. Use .yaml files.

Load GRI 3.0 mechanism, set temperature and pressure, and compute chemical equilibrium.

import cantera as ct gas = ct.Solution('gri30.yaml') gas.TP = 300, ct.one_atm print('Mole fractions:', gas.X) # Simple equilibrium gas.equilibrate('HP') print('Adiabatic flame T:', gas.T)
cantera --version
Debug
Known issues
breakingCantera 3.0 removed support for .cti and .xml input files. Only .yaml (or .yml) mechanism files are supported.
fix
Convert .cti files to .yaml using provided conversion script (cti2yaml) or update paths to use .yaml mechanisms.
affects: 3.0.0+
breakingThermoPhase objects no longer have methods like 'setTemperature' or 'setMoleFractions'. Use property assignment: gas.TP = (T, P); gas.X = composition_dict.
fix
Replace old-style setters with direct property assignment. See migration guide.
affects: 3.0.0+
deprecatedThe 'importInterface' function is deprecated and will be removed in Cantera 4.0. Use 'Interface' class directly.
fix
Replace ct.importInterface('file.yaml', 'phase_name') with ct.Interface('file.yaml', 'phase_name').
affects: 3.2.0
gotchaCantera on Windows may require Microsoft Visual C++ Redistributable. Missing it leads to 'DLL load failed' errors.
fix
Install VC++ Redistributable from Microsoft (see Cantera installation docs).
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'cantera._cantera'
Cantera compiled extension missing; common when installed as source without proper build prerequisites.
fix
Use a precompiled wheel: pip install cantera --only-binary cantera. Or install build tools (Cython, compilers) for source build.
RuntimeError: No such thermo XML node: 'NASA'
Attempting to load a YAML file that contains XML remnants or using XML parser on YAML. Cantera 3.x only reads YAML.
fix
Ensure the mechanism file is in YAML format. Convert .cti or .xml using cti2yaml or ck2yaml.
AttributeError: module 'cantera' has no attribute 'Solution'
Old import style (from cantera import *) or very outdated version (<2.3).
fix
Use import cantera as ct then ct.Solution(...). Ensure Cantera >= 2.3.
Upgrade
Version history
3.2.0latest on PyPI · released Nov 18, 2025
Audit
Dependencies
numpyrequiredRequired for array handling and scientific computing
libpythonoptionalCantera compiled extension requires Python development headers at build time
Agent activity
14 hits · last 30 days
node
12
OpenAI (training)
1
Resources
cantera — pip install cantera · libregistry