Cantera 'module' object has no attribute 'Solution'

1.4k views Asked by At

My question is the same as the one here.

Module object has no attribute [CANTERA]

Ray Speth commented but the OP of that post never responded so I'm hoping that maybe Ray could help me out.

I installed Cantera and did tried to make a gas doing the following

import cantera as ct
gas1 = ct.Solution('gri30.xml')

and I got the error

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Solution'

I did as the comment suggested and got the following outputs

print(ct.__file__)
/usr/local/lib/python2.7/site-packages/cantera/__init__.py

print(ct.__version__)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute '__version__'
1

There are 1 answers

0
Travis_Dudeson On
  • Check the versions and compatibility of your Python and Cantera.
  • Also, check that your mechanism file is correctly merged (the thermo and kinetics files to make the .cti file).