Ask Your Question
1

how to shift to source installed sage in Ubuntu

asked 2021-09-07 18:50:35 +0100

anonymous user

Anonymous

I installed sage from the command line initially with 'sudo apt .....' and subsequently wanted to run the version from source. I have installed the source file successfully now but on the command line the older version runs when sage command is typed. I realize that the SAGE_ROOT path needs to be specified again and would want to know what is the best way to do this ?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2021-09-08 14:26:25 +0100

Masacroso gravatar image

updated 2021-09-09 17:05:39 +0100

You cannot run sage from source code, maybe you mean from a binary. I will assume that you have download the tar.bz2 file for sagemath in ubuntu from the web of sage. Then first uninstall the sage installed with sudo apt, this is to free space as you will not use this anymore. Now go to the folder where you have unzipped the tar.bz2 file and copy it direction to add it to the $PATH, to do this follow these instructions.

Once you have done this maybe you will need to reboot the system, and then you can call sage from any terminal just with the command sage.

edit flag offensive delete link more
0

answered 2021-09-12 09:41:59 +0100

slelievre gravatar image

If I understand correctly, you have installed Sage both

  • from the distribution, using sudo apt install ...
  • from source, by downloading the source file, extracting it, and running make configure, ./configure, and make

Let's say your installed-from-source Sage is at /home/yourname/sagemath/sage, then you add an alias to it and place it to some directory that is in your PATH.

For example:

ln -s /home/yourname/sagemath/sage /usr/local/bin

or with sudo if necessary:

sudo ln -s /home/yourname/sagemath/sage /usr/local/bin

After that, running sage should run the Sage you want.

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

1 follower

Stats

Asked: 2021-09-07 18:50:35 +0100

Seen: 235 times

Last updated: Sep 12 '21