Ask Your Question

Installation problem on Mac

asked 2017-02-22 15:18:11 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

I followed the steps in readme.txt but when I double click on sage, it did not pop up, instead it says

Last login: Wed Feb 22 13:05:21 on console
MacBook-Pro/Applications/SageMath/sage ; exit;
RecursionError: maximum recursion depth exceeded during compilation
│ SageMath version 7.5.1, Release Date: 2017-01-15                   │
│ Type "notebook()" for the browser-based notebook interface.        │
│ Type "help()" for help.                                            │

ERROR:  The Sage installation tree has moved

from /Users/buildslave-sage/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidma
  to /Applications/SageMath

This is not supported, and Sage will not work. To install Sage from a
binary package:

1. Open the .tar.bz2 archive (or .dmg on OSX)

2. Move the SageMath folder/app to where you want it to be. You can
   also rename the directory now.

3. Start sage for the first time. This will then automatically patch
   paths in binaries.

After starting Sage for the first time you cannot change the
installation any more. To install Sage elsewhere, start over from the
binary package. Or recompile Sage from scratch in the new location
("make distclean && make")

Saving session...
...copying shared history...
...saving history...truncating history files...

[Process completed]

My computer info: macOS 10.12.3 (16D32) 2 GHz Intel Core i7

The one I downloaded: sage-7.5.1-OSX_10.11.6-x86_64.dmg

Has anyone encountered the same problem?

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted

answered 2017-03-09 06:18:16 -0500

Extending @paulmasson's answer regarding Anaconda, you might also invoke sage via a little shell script that sets up an appropriate environment. Something along the lines


export SAGE_ROOT=`ls -d1 /Applications/Sage*/Contents/Resources/sage|tail -1`
export PATH=/usr/local/bin:/usr/bin:/sbin:/bin # this overwrites the PATH defined in your .profile and .bashrc
$SAGE_ROOT/local/bin/sage "$@"

Then at the very end of your ~/.profile or ~/.bashrc you add the line

export PATH=~/bin:$PATH

which ensures that before anything else the shell looks for commands in your ~/bin directory. You can then invoke sage from the command line.

Alternatively, if you insist on clicking the sage icon in /Applications, you can just edit /Applications/, which is a shell script. Near the beginning just add the line from above that resets the PATH variable.

edit flag offensive delete link more

answered 2017-02-22 19:07:40 -0500

I'll bet you have Anaconda installed. Previous answers have indicated that removing a single line from a configuration file will allow Sage to run with Anaconda installed:

Anaconda adds itself to the $PATH variable through .bashrc during installation. Removing any references to Anaconda in your $PATH should allow Sage to run.

The other alternative which is known to work is to uninstall Anaconda completely.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2017-02-22 15:18:11 -0500

Seen: 48 times

Last updated: Mar 09