Ask Your Question
1

Unable to locate package Sagemath

asked 2024-10-24 13:06:40 +0100

Shaussie01 gravatar image

Newbie question:

I have been trying to get Sagemath installed on a Win10 PC. Have installed WSL and Ubuntu 24.04. I have tried $ sudo apt install sagemath however, it returns the message "Unable to locate package Sagemath". Earlier, it came back with a more verbose comment "Package sagemath is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source".

Would much appreciate any workable advise to get me started on SageMath / Win10 / WSL / Ubuntu24.04.

Towards the working end to complete the SageMath install, I find that much of the information available on the web is vague and imprecise.

Many Thanks... Shahid / Shaussie.

edit retag flag offensive close merge delete

Comments

2

I'm not sure if the repo version of SageMath is the latest. In order to have the latest version easily, I recommend you install SageMath using conda. Please see https://doc.sagemath.org/html/en/installation/index.html and follow the instructions in the paragraph starting with "Start Ubuntu from the Start menu, and type the following commands to install Sage from conda-forge. ". Of course, it is better to read all Windows / No development section on that page.

tolga gravatar imagetolga ( 2024-10-24 16:05:07 +0100 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2024-10-25 10:18:23 +0100

eric_g gravatar image

There is indeed no sagemath package for Ubuntu 24.04. Please follow these instructions to install SageMath:

https://sagemanifolds.obspm.fr/instal...

It shoud work for Ubuntu 24.04 in WSL.

edit flag offensive delete link more

Comments

W11,WSL, UBUNTU24.02 ,SAGEMATH 10.4 installing with the link above

I also encountered a missing package (me with with the libpcre3-dev library) which was resolved with the command:

sudo apt-get install libpcre3-dev=2:8.39-15build1
ortollj gravatar imageortollj ( 2024-11-05 17:07:52 +0100 )edit
0

answered 2024-10-26 12:12:19 +0100

Shaussie01 gravatar image

Thank you Tolga and eric_g for your comments, and my apologies in advance for asking the most basic questions on this forum.

I am having a difficult time copying (is ok) and pasting (problem here) the long prompt from Sage Manifolds. This copying and then pasting issue then re-occurs in the other conda-forge solution. I am unable to paste anything into Ubuntu / Linux using CTRL-V from the clip-board. Is there a work-around for this? Thanks.

Could you also please tell me what is wrong with the conda-forge prompt below. Have I got the spacing wrong. Normally a Curl would have a source and target separated by some space. May I get the corrected version of the prompts given in the Sage handout (using conda-forge) where the tokens are clearly shown joined and seperated.

$ curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" $ bash Miniforge3-$(uname)-$(uname -m).sh

Many Thanks, Shahid (Shaussie01)

edit flag offensive delete link more

Comments

Your formatting problem is due to you $ prompt, which directs Markdown to interpret the text between $ as LaTeX code. You can include a literal block (i. e. a "raw" block of text where Markdown formating isn't needed) by indenting it by four spaces (or using the "101010" button) (or selecting your block and typing Ctrl-K) ; you can insert literals inline by bracketing them in backquotes (`).

Your block should read :

$ curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
$ bash Miniforge3-$(uname)-$(uname -m).sh

See the source of this comment for examples.

Can you tell us what is uname in the above ? And what is the answer of the system ? Look up in your logs (possibly install.log), if any.

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2024-10-26 13:46:51 +0100 )edit

Thank you Emmanuel Charpentier for your advise. The mistake I was making was to have an extra $ in front of the prompts, as you have noted. Removing $ worked.

The next command also works: "$bash Miniforge3-$(uname)-$(uname -m).sh" Its output is: "Welcome to Miniforge3 24.9.0-0"

There are 2 or 3 more commands left and here the problem is that the system cannot find either "conda" or "mamba" commands: "$conda create -n sage sage python=3.11" results in "Conda : command not found. $mamba results in : "command "mamba" not found. uname is "Linux"

This is the tail-end of the installation process. Please advise how to find (in Ubuntu) if a given command is installed on the system. After that I need to run: "conda activate sage"

Many thanks in advance, Shahid

Shaussie01 gravatar imageShaussie01 ( 2024-10-28 11:51:14 +0100 )edit

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: 2024-10-24 13:06:40 +0100

Seen: 361 times

Last updated: Oct 26