Ask Your Question
0

Interface between Sage and Python

asked 2015-04-22 22:33:08 +0100

chan.y.park gravatar image

Hello,

I wonder if there is a way (or an API) that one can use Sage inside a Python code.

More specifically, I have a system of equations defined inside a big Python code, and I want to make Sage solve the equations and give the solutions back to Python.

Using the Python of Sage is out of option, unfortunately. Rather, I want to 'import' Sage onto Python and use its functionality as I import other Python libraries.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-04-23 11:32:28 +0100

tmonteil gravatar image

updated 2015-04-23 13:21:21 +0100

To use Sage from a Python script, you indeed have to use Sage's Python, since various environment variables are set up (PATH, etc), see this page.

Could you please explain why using the python of Sage is out of option ? What prevents you to follow the instructions above ? Perhaps this problem will be easier to solve.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2015-04-22 22:33:08 +0100

Seen: 395 times

Last updated: Apr 23 '15