Posts Tagged ‘computer algebra system’

Yes you can import Sage as a library in a Python script. One caveat is that you need to run that Python script using the version of Python that is bundled with Sage; currently Python 2.6.x. To import Sage, put the following in your Python script:

from sage.all import *

Then when you want to run your [...]


After compiling a source version of Sage, you can choose to run the test suite on the whole Sage library, on all modules under a given directory, or on a specified module only. For the purposes of this post, I have compiled Sage 4.1.1 from source and the top level Sage directory is

[mvngu@mod sage-4.1.1]$ pwd
/scratch/mvngu/build/sage-4.1.1

Testing [...]


Compiling Sage 4.1 on Mac OS X 10.5.8 is fairly easy, i.e. if you want to build Sage in 32-bit mode. You download a source version of Sage, uncompress the tarball, navigate to the top level directory of the source version, and issue make. But if you want to build in 64-bit mode, you need [...]