1 | initial version |
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
~/bin/sage
:
#!/bin/bash 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/SageMath-7.5.1.app/sage
, which is a shell script. Near the beginning just add the line from above that resets the PATH variable.