Ask Your Question
0

Interface between Sage and Python

asked 10 years ago

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.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered 10 years ago

tmonteil gravatar image

updated 10 years ago

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.

Preview: (hide)
link

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: 10 years ago

Seen: 426 times

Last updated: Apr 23 '15