installing cantera with sage

19 views
Skip to first unread message

Paul DesJardin

unread,
Oct 13, 2017, 5:59:15 PM10/13/17
to sage-support
Hi,

Is there a way to install Cantera (http://www.cantera.org/docs/sphinx/html/install.html) so it works with sage?
I can get Cantera installed and working with python/ipython using the Conda installation directions but I don't see how
to adapt these direction for use with sage.  Any help or guidance would be much appreciated.  Thank you,

Paul

Simon King

unread,
Oct 14, 2017, 3:44:59 AM10/14/17
to sage-s...@googlegroups.com
Hi Paul,

disclaimer: I didn't try to install Cantera. But generally, to install
Python packages that are not part of the SageMath ecosystem, you should
first open a Sage shell by the command
sage -sh

Then, in the Sage shell, you follow the instructions to install the
package. Sage has its own Python, that is separate from
your system-wide Python. So, if you follow the instruction in a plain
terminal, the installation will end in the system-wide Python that
SageMath can not find.

Example from my machine:
System-wide Python:
king@king-ThinkPad-T430:~$ python --version
Python 2.7.12

Sage's Python
king@king-ThinkPad-T430:~$ ~/Sage/git/sage/sage -sh
...
Note: SAGE_ROOT=/home/king/Sage/git/sage
(sage-sh) king@king-ThinkPad-T430:~$ python --version
Python 2.7.13

Best regards,
Simon

Dima Pasechnik

unread,
Oct 14, 2017, 4:39:37 AM10/14/17
to sage-support
I did try installing it from source, and got a mysterious error after trying to run 'scons build' in the Sage shell.
Reply all
Reply to author
Forward
0 new messages