new install and M2 works in the terminal only from the main directory

17 views
Skip to first unread message

Irena Swanson

unread,
Nov 6, 2025, 9:48:13 AMNov 6
to Macaulay2
I have a new MacBook Pro, installation of the latest version of M2 went fine, except for read below.  I use M2 from the Terminal.

If I invoke it in the Terminal with "M2" from the main directory, it works as expected, but if I change directory to the folder /Users/iswanso/mac with all my M2 scripts and then type "M2" in the terminal, I get the following:

Macaulay2, version 1.25.06
/opt/homebrew/Cellar/macaulay2/1.25.06_4/share/Macaulay2/Core/debugging.m2:18:13:(1):[18]: error: 'export' expected a string or an option but was given 'eliminate', of class Symbol
Elimination.m2:9:8-9:17: here is the first use of 'eliminate'
/opt/homebrew/Cellar/macaulay2/1.25.06_4/share/Macaulay2/Core/packages.m2:421:22:(1):[17]: --back trace--
/opt/homebrew/Cellar/macaulay2/1.25.06_4/share/Macaulay2/Core/packages.m2:408:8:(1):[16]: --back trace--
Elimination.m2:9:6:(2):[14]: --back trace--
/private/tmp/macaulay2-20250912-24405-fhtxrm/M2-release-1.25.06/M2/Macaulay2/m2/startup.m2.in:65:23:(0): entering debugger (enter 'help' to see commands)
/private/tmp/macaulay2-20250912-24405-fhtxrm/M2-release-1.25.06/M2/Macaulay2/m2/
startup.m2.in:65:16-65:32: --source code:
         ret := loadfun filepath;

I suspect that I have to set the path somewhere.

Below is the output from "printenv PATH" (again, /Users/iswanso/mac" is where I keep all my Macaulay2 scripts and that IS in the path):
.:/Users/iswanso/mac:/Users/iswanso/shsamples:/Users/iswanso/edit:/Users/iswanso/opt/anaconda3/bin:/Library/Frameworks/Python.framework/Versions/3.8/bin:/opt/homebrew/Cellar/macaulay2/1.25.06_4/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Applications/Privileges.app/Contents/MacOS:/Library/TeX/texbin:/opt/homebrew/bin:/usr/local/laps

Has anybody else encountered this?
Irena

Doug Torrance

unread,
Nov 6, 2025, 10:43:35 AMNov 6
to maca...@googlegroups.com
The Macaulay2 variable "path" is a list that determines the order in
which the directories are searched for m2 files. By default, the
first element of "path" is the current directory. My guess is that
the copy of Elimination.m2 in /Users/iswanso/mac is out of date. But
Elimination is one of the pre-loaded packages that are automatically
loaded by Core, so this file is getting loaded instead of the
Elimination.m2 that's distributed with Macaulay2. I'd suggest either
removing or renaming this version of Elimination.m2.
> --
> 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 visit https://groups.google.com/d/msgid/macaulay2/6ff8326b-c1e2-4c8c-8e3d-933dff8d0e93n%40googlegroups.com.

Irena Swanson

unread,
Nov 6, 2025, 11:02:22 AMNov 6
to Macaulay2
You are so right, Doug.  Thank you. I removed those files and now M2 works.

Thanks!
Irena
Reply all
Reply to author
Forward
0 new messages