ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 12 Sep 2021 09:41:59 +0200how to shift to source installed sage in Ubuntuhttps://ask.sagemath.org/question/58877/how-to-shift-to-source-installed-sage-in-ubuntu/ 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 ?Tue, 07 Sep 2021 18:50:35 +0200https://ask.sagemath.org/question/58877/how-to-shift-to-source-installed-sage-in-ubuntu/Answer by slelievre for <p>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 ?</p>
https://ask.sagemath.org/question/58877/how-to-shift-to-source-installed-sage-in-ubuntu/?answer=58978#post-id-58978If 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.Sun, 12 Sep 2021 09:41:59 +0200https://ask.sagemath.org/question/58877/how-to-shift-to-source-installed-sage-in-ubuntu/?answer=58978#post-id-58978Answer by Masacroso for <p>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 ?</p>
https://ask.sagemath.org/question/58877/how-to-shift-to-source-installed-sage-in-ubuntu/?answer=58901#post-id-58901You 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](https://askubuntu.com/a/846959).
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`.Wed, 08 Sep 2021 14:26:25 +0200https://ask.sagemath.org/question/58877/how-to-shift-to-source-installed-sage-in-ubuntu/?answer=58901#post-id-58901