0

I am installing SageMath from the source code, I get an issue while installing the tar.bZ2 file. I am doing it giving the make -j4 command but I get the error shown below. I also have python3.8.2 by default on my ubuntu 20.04. Please kindly help me to remove this error. If I have to bring themake command into the path of sage then, how can I do? Please kindly help. Note: I have gone through some similar posts on this plateform, but yet my problem is not solved. I am sure there is no GNU issue because GNU Make 4.2.1 is present by default in the system.

The sage folder contains the files shown in the image, if there is lacking something I may not undestand while downloading the source code, then please guide

This is the sage root directory where I have put everything

Thank yoou in adavance

xenoid
  • 5,504
Karim
  • 11

3 Answers3

1

It's not necessary to compile sagemath from source because sagemath is in the default repositories of Ubuntu 20.04. To install SageMath in Ubuntu 18.04 and later open the terminal and type:

sudo apt install sagemath

If you install SageMath with the above command it will be updated when a software update to the sagemath package becomes available. SageMath is a viable free open source alternative to Magma, Maple, Mathematica and Matlab.

karel
  • 114,770
  • It creates a lot of errors, this method is not useful, although it seems easiest. – Karim Jul 28 '20 at 08:11
  • The most likely reason for the [unmet dependencies??] errors is that you have added PPA(s) or other third-party software sources to your default software sources. See the answers to How do I restore the default repositories?. If your package management is broken, the errors will keep coming back until you fix it. – karel Jul 28 '20 at 08:24
0

python used to start a Python v2 interpreter. Python v2 is is now deprecated so there is no longer a default python on Ubuntu from 20.04 onwards.

You can still install a python2 or python2-minimal package that provides a python2 command (sudo apt install python2-minimal), and then create a soft link to it in a directory which is in your path.

To avoid modifying your system, you can create a ~/bin directory (default bash profiles include it in your PATH if they find it), add in it your PATH, and create a soft link to the python2 command in it: ln -s /usr/bin/python2 ~/bin/python.

xenoid
  • 5,504
  • Well, I have tried this as well, but no changes in the error. I do not understand this path; ' /usr/bin/env' what is the problem with it? – Karim Jul 28 '20 at 08:10
  • See Alex Martelli's answer here for some background. After adding the soft link as indicated, typing python in your command line should start the Python v2 interpreter (you of course have to restart a terminal session to rerun the profile(s)), and make sure the ~/bin directory is in your PATH. – xenoid Jul 28 '20 at 08:20
0

I have used both of the methods suggested above, I am thankful to both. The soft link option might go better, I might not have done in an exact way as suggested. But my problem was resolved with the help of the Sage support Team, with the following command.

"the standard Ubuntu's way to deal with the python problem seems to be to use update-alternatives command, something like this:"

sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.7 10

Thanks to the Sage support team, and Dima Pasechnik especially. it may be useful for someone who may face the same issue. Note: I have Python3.8.2, in the command I used Python3.8 but I do not know why not to write the full version.

Karim
  • 11