sagemath / sage

Main repository of SageMath. Now open for Issues and Pull Requests.
https://www.sagemath.org
Other
1.21k stars 419 forks source link

Implement an install script for newcomers #33765

Open soehms opened 2 years ago

soehms commented 2 years ago

As suggested in this sage-devel-thread we need to simplify the installation for newcomers who are not familiar with complicated install procedures. Since there is a satisfactory solution for Mac users and Windows users are advised to use WSL we may assume that most of them will try to install Sage on Ubuntu or Debian systems. The aim is that the user can install Sage copying one line into a bash terminal, say

curl -I -O https://github.com/sagemath/sage-prod/tree/develop/src/bin/easy_install_sage.sh && easy_install_sage.sh

Suggestion: The script should do the following:

  1. Check if we are on an Ubuntu / Debian system. If not goto 7.
  2. Check if Conda / Mamba is present on the system. If yes, do the according installation and exit.
  3. Obtain the Sage version which would be installed by apt from https://repology.org/api/v1/projects/sagemath. If this is the current version, ask the user if he has root access. If yes, do the installation using apt and exit.
  4. If the version number obtained in 2. is less than 9.2, show a warning.
  5. Ask the user if he agrees to install Mamba on his system. If yes then ask if Mamba should be removed / deactivated after installation and install Sage accordingly and exit.
  6. Ask the user if he has root access. If yes, do the installation using apt and exit.
  7. Show a message that other installation methods can be found in our installation guide and print out its URL.

Now and again this script could be extended to other, more exotic Linux distributions, as well. I would not include the installation from source here, since that should be done by poeple who know what they do.

Depends on #33740

Component: scripts

Issue created by migration from https://trac.sagemath.org/ticket/33765

mkoeppe commented 2 years ago
comment:1

I think what is described is already too complex. Just a script that does the conda installation would be good enough, I think.

mkoeppe commented 2 years ago
comment:2

And it should definitely not be called easy_install... because this term is associated with ancient python technology

soehms commented 2 years ago
comment:3

Replying to @mkoeppe:

I think what is described is already too complex.

My intention was to have the intervention on the users system as minimally invasive as possible. I don't know how much conda changes the behavior of the system but at least it changes it visually (prompt) what might be a matter of irritation to the user.

Just a script that does the conda installation would be good enough, I think.

Agreed! At least that would make things much easier for a start. If users will accept it then it's fine!

And it should definitely not be called easy_install... because this term is associated with ancient python technology

I see! What would you suggest? Maybe install_sage_conda.sh according to the reduction of the functionality?

tobiasdiez commented 2 years ago

Dependencies: #33740