sagemath_macaulay2: Computing in commutative algebra, algebraic geometry and related fields with Macaulay2¶
This pip-installable distribution passagemath-macaulay2
provides an interface to
Macaulay2.
What is included¶
The binary wheels published on PyPI include a prebuilt copy of Macaulay 2.
Examples¶
Using Macaulay 2 on the command line:
$ pipx run --pip-args="--prefer-binary" --spec "passagemath-macaulay2" sage -sh -c 'M2'
Finding the installation location of Macaulay 2:
$ pipx run --pip-args="--prefer-binary" --spec "passagemath-macaulay2[test]" ipython
In [1]: from sage.features.macaulay2 import Macaulay2
In [2]: Macaulay2().absolute_filename()
Out[2]: '.../bin/M2'
Using the Python interface:
$ pipx run --pip-args="--prefer-binary" --spec "passagemath-macaulay2[test]" ipython
In [1]: from sage.all__sagemath_macaulay2 import *
In [2]: R = macaulay2('QQ[x, y]'); R
Out[2]: QQ[x..y]
In [3]: S = R / macaulay2('ideal {x^2 - y}'); S
Out[3]:
QQ[x..y]
--------
2
x - y
In [4]: S.gens()
Out[4]: {x, y}
Type¶
optional
Dependencies¶
Version Information¶
package-version.txt:
10.6.3
version_requirements.txt:
passagemath-macaulay2 ~= 10.6.3.0
Equivalent System Packages¶
(none known)