Installation error

740 views
Skip to first unread message

Michael Andeweg

unread,
Mar 26, 2015, 7:26:52 AM3/26/15
to canter...@googlegroups.com

Hello all,

I recently bought a new laptop and I want to install Cantera on it, but it doesn't work out yet. At my old laptop I had Python 3.4.0. with NumPy 1.8.2. (64-bit) and Cantera 2.1.2, which worked great. If I install the same (or newer) version on my new laptop and try to run something, I get a long error code like the one described here. Can anybody help me out?

Regards, 

Michael



Procedure: ct2ctml
Error:   Error converting input file "C:/Program Files/Cantera/data/gri30.cti" to
CTML.
Python command was: 'C:\Python34\python.exe'
The exit code was: 7
-------------- start of converter log --------------
Traceback (most recent call last):
  File "<stdin>", line 5, in <module>
  File "C:\Python34\lib\site-packages\cantera\__init__.py", line 1, in <module>
    from ._cantera import *
  File "__init__.pxd", line 155, in init cantera._cantera
  (cantera/_cantera.cpp:69835)
ImportError: No module named 'numpy'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 7, in <module>
ImportError: No module named 'ctml_writer'
--------------- end of converter log ---------------

Error in XML_Node (line 11)
    x.id = ctmethods(10,15,0,src); % newxml(name)

Error in Solution (line 30)
doc = XML_Node('doc',src);

Error in IdealGasMix (line 39)
            s = Solution(a);

Ray Speth

unread,
Mar 26, 2015, 8:00:51 AM3/26/15
to canter...@googlegroups.com
Michael,

Based on the line:

    ImportError: No module named 'numpy'

it looks like you don't have NumPy installed. You can download the NumPy installer from http://www.lfd.uci.edu/~gohlke/pythonlibs/

Regards,
Ray

Michael Andeweg

unread,
Mar 26, 2015, 8:58:40 AM3/26/15
to canter...@googlegroups.com
Hey Ray,

The Python3.4 compatible NumPy from the link is not working, so I installed it from another source, I got the blue screen which usually should appear and numpy was located in the folder of Python after running the installer. SO it should be fine I guess. I also installed Cantera, according to the standard procedure at http://cantera.github.io/docs/sphinx/html/install.html 
I get another error code when I try to run a file I have created at my other laptop and I also get the error when I just try to implement air with gas=importPhase('air.cti')

Procedure: ct2ctml
Error:   Error converting input file "C:/Program Files/Cantera/data/gri30.cti" to
CTML.
Python command was: 'C:\Python34\python.exe'
The exit code was: 7
-------------- start of converter log --------------
Traceback (most recent call last):
  File "<stdin>", line 5, in <module>
ImportError: No module named 'cantera'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 7, in <module>
ImportError: No module named 'ctml_writer'
--------------- end of converter log ---------------

Error in XML_Node (line 11)
    x.id = ctmethods(10,15,0,src); % newxml(name)

Error in Solution (line 30)
doc = XML_Node('doc',src);

Error in importPhase (line 5)
    s = Solution(file);

Error in LNGphi (line 1)
g1=importPhase('gri30.cti')

Ray Speth

unread,
Mar 26, 2015, 9:11:36 AM3/26/15
to canter...@googlegroups.com
Michael,

I'm not sure what's going on here. It seems that initially, it was clearly finding the cantera Python module (given the appearance of 'C:\Python34\lib\site-packages\cantera\__init__.py' in the traceback. However, now the error just says it can't find the cantera module. Can you confirm that the directory C:\Python34\lib\site-packages\cantera exists and contains the expected files? If you just open up the Python 3.4 interpreter, are you able to successfully run 'import cantera'?

Regards,
Ray

Michael Andeweg

unread,
Mar 26, 2015, 9:40:40 AM3/26/15
to canter...@googlegroups.com
Ray,

There is indeed no directory named Cantera, which I find strange since I am following the exact procedure as described. I did this before at my other laptop and then it worked.

Gr. Michael

Michael Andeweg

unread,
Mar 26, 2015, 9:55:15 AM3/26/15
to canter...@googlegroups.com
I copied to proper directory to the location and it works now. You were again of great help Ray, I appreciate it! 

Gr. Michael
Reply all
Reply to author
Forward
0 new messages