Trouble loading packages

107 views
Skip to first unread message

Trevor Karn

unread,
Aug 15, 2022, 10:04:26 AM8/15/22
to Macaulay2
Hi all,
I'm new to M2, and I'm having some trouble using the "InvariantRing" package, would anyone here be able to help or help me troubleshoot?

I try to load the InvariantRing package, but the functions are unavailable to me and only seem to be symbols rather than methods. (I am using MacOS Monterey 12.2.)

Macaulay2, version 1.20

with packages: ConwayPolynomials, Elimination, IntegralClosure, InverseSystems, Isomorphism, LLLBases, MinimalPrimes, OnlineLookup, PrimaryDecomposition, ReesAlgebra, Saturation, TangentCone

i1 : loadPackage("InvariantRing")

o1 = InvariantRing

o1 : Package

i2 : finiteAction

o2 = finiteAction

o2 : Symbol

i3 : permutationMatrix

o3 = permutationMatrix

o3 : Symbol


The same code seems to work on the Macaulay2Web. 

Macaulay2, version 1.20.0.1
with packages: ConwayPolynomials, Elimination, IntegralClosure, InverseSystems, Isomorphism, LLLBases, MinimalPrimes, OnlineLookup, PrimaryDecomposition, ReesAlgebra, Saturation, TangentCone
i1 : loadPackage("InvariantRing")
o1 =  InvariantRing
o1 :  Package
i2 : permutationMatrix
o2 =  permutationMatrix
o2 :  MethodFunction
i3 : finiteAction
o3 =  finiteAction
o3 :  MethodFunction

Federico Galetto

unread,
Aug 15, 2022, 4:12:24 PM8/15/22
to Macaulay2
Hello,

I wonder if this is an issue specific to the InvariantRing package or possibly something else. Have you tried any other package?

Cheers,
Fred.

Mahrud Sayrafi

unread,
Aug 15, 2022, 4:29:10 PM8/15/22
to maca...@googlegroups.com
Hi Trevor,

Also try running Macaulay2 with "M2 -q" before loading the package. If this resolves the problem, there might be a faulty version installed, or something like that. You could try "uninstallAllPackages()" in that case.

Best,
Mahrud

--
You received this message because you are subscribed to the Google Groups "Macaulay2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to macaulay2+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/macaulay2/56339a72-a8bf-4968-8539-36977c2b0e63n%40googlegroups.com.

Trevor Karn

unread,
Aug 15, 2022, 6:02:29 PM8/15/22
to maca...@googlegroups.com
Fred and Mahrud,

Thanks so much for your help! It seems that it was specific to invariant rings:

Macaulay2, version 1.20
with packages: ConwayPolynomials, Elimination, IntegralClosure, InverseSystems, Isomorphism,
               LLLBases, MinimalPrimes, OnlineLookup, PrimaryDecomposition, ReesAlgebra,
               Saturation, TangentCone
i1 : needsPackage "SpechtModule"
o1 = SpechtModule

o1 : Package
i2 : permutationMatrix
o2 = permutationMatrix
o2 : MethodFunction
i3 : quit

However Mahrud's suggestion of M2 -q seemed to fix it! @Mahrud, would you be able to explain what the -q flag does? 

M2 -q
Macaulay2, version 1.20
with packages: ConwayPolynomials, Elimination, IntegralClosure, InverseSystems, Isomorphism,
               LLLBases, MinimalPrimes, OnlineLookup, PrimaryDecomposition, ReesAlgebra,
               Saturation, TangentCone

i1 : needsPackage "InvariantRing"


o1 = InvariantRing

o1 : Package

i2 : permutationMatrix

o2 = permutationMatrix

o2 : MethodFunction

i3 : permutationMatrix(4, [2,3])

o3 = | 1 0 0 0 |
     | 0 0 1 0 |
     | 0 1 0 0 |
     | 0 0 0 1 |

              4        4
o3 : Matrix ZZ  <--- ZZ

Thanks again.

Best Regards,

Trevor Karn


You received this message because you are subscribed to a topic in the Google Groups "Macaulay2" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/macaulay2/GBuE4Fg65LI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to macaulay2+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/macaulay2/CAA3cHptRh%2BjW30Wsx6oPrn_V3wHcYLsxszz0jyx_%3D4gM7GZ7EQ%40mail.gmail.com.

Mahrud Sayrafi

unread,
Aug 15, 2022, 7:02:10 PM8/15/22
to maca...@googlegroups.com
Glad that worked!

If you manually install a package (e.g. if you're making your own version), Macaulay2 prioritizes loading your version from your local directory in .Macaulay2/local. The -q option prevents M2 from looking there, instead loading the version of the package that it comes with, and also avoids reading the ~/.Macaulay2/init.m2 file before loading, which people use to preload default fields or things like that. So basically it's starting M2 in safe-mode, similar to Sage's --nodotsage option.

The source of the problem could be that either an old version of the package was installed that is not compatible with M2 v1.20 (in which case running uninstallAllPackages() or uninstallPackage "InvariantRings" should fix it), or something is wrong in your init.m2 file.

Best,
Mahrud

Reply all
Reply to author
Forward
0 new messages