SageMath installation sous windows 10 ou 11

Discutez d'informatique ici !
Avatar de l’utilisateur
ortollj
Membre Rationnel
Messages: 554
Enregistré le: 13 Mai 2009, 10:28

SageMath installation sous windows 10 ou 11

par ortollj » 23 Mai 2022, 08:23

Bonjour
ci dessous j'ai tenté un résumé des commandes du site de Sandy Scott
edited[2022/05/24] j'ai oublié de preciser mon résumé est simplifié par rapport a celui de Sandy Scott pour utiliser sagemath avec Jupyter Notebook sans Jupyter Lab !.
# 2022/05
Code: Tout sélectionner
first install WSL2
https://docs.microsoft.com/en-us/windows/wsl/install

sudo apt update
sudo apt upgrade

sudo apt-get install  bc binutils bzip2 ca-certificates cliquer cmake curl ecl eclib-tools fflas-ffpack flintqs g++ g++ gcc gcc gengetopt gfan gfortran glpk-utils gmp-ecm lcalc libatomic-ops-dev libboost-dev libbraiding-dev libbrial-dev libbrial-groebner-dev libbz2-dev libcdd-dev libcdd-tools libcliquer-dev libcurl4-openssl-dev libec-dev libecm-dev libffi-dev libflint-arb-dev libflint-dev libfreetype6-dev libgc-dev libgd-dev libgf2x-dev libgiac-dev libgivaro-dev libglpk-dev libgmp-dev libgsl-dev libhomfly-dev libiml-dev liblfunction-dev liblrcalc-dev liblzma-dev libm4rie-dev libmpc-dev libmpfi-dev libmpfr-dev libncurses5-dev libntl-dev libopenblas-dev libpari-dev libpcre3-dev libplanarity-dev libppl-dev libprimesieve-dev libpython3-dev libqhull-dev libreadline-dev librw-dev libsingular4-dev libsqlite3-dev libssl-dev libsuitesparse-dev libsymmetrica2-dev libz-dev libzmq3-dev libzn-poly-dev m4 make nauty openssl palp pari-doc pari-elldata pari-galdata pari-galpol pari-gp2c pari-seadata patch perl pkg-config planarity ppl-dev python3 python3 python3-distutils r-base-dev r-cran-lattice singular sqlite3 sympow tachyon tar tox xcas xz-utils xz-utils

cd ~
wget http://www.mirrorservice.org/sites/www.sagemath.org/src/sage-9.5.tar.gz
tar xvf sage-9.5.tar.gz

cd sage-9.5
./configure

make
nano ~/.bashrc # add this line below at the end of bashrc
alias sage=~/sage-9.5/sage

Close ubuntu then reopen it.

edit sage_nb.sh 
nano ~/sage_nb.sh

put these 3 lines into it:

#!/bin/bash
cd /mnt/c/Documents\ and\ Settings/UserW10
/home/UserLinux/sage-9.5/sage --notebook

chmod ug+x sage_nb.sh

./sage_nb.sh

Create windows shortcut

    Open Windows explorer, and type %APPDATA%\Microsoft\Windows\Start Menu\Programs
    Make a copy of any of the program icons – we’ll customise it to do what we want
    Right-click, and choose properties.
    On the General tab:
        Change the name to whatever you want.
    On the Shortcut tab:
        Change Target to: C:\Users\UserW10\AppData\Local\Microsoft\WindowsApps\ubuntu.exe run ~/sage_nb.sh
        Change Start in to: %USERPROFILE%
        Change Run to: Minimised
        Change the icon if you want – there are plenty of pieces of software that can create a .ico icon file one from an image file.

# UserW10= Users name,UserLinux = Linux Users name :
# where ubuntu.exe is located (for me Ubuntu2004.exe not ubuntu.exe!):
C:\Users\UserW10\AppData\Local\Microsoft\WindowsApps
si j'avais su j'aurais pas venu.



phyelec
Membre Rationnel
Messages: 946
Enregistré le: 06 Mar 2020, 18:47

Re: SageMath installation sous windows 10 ou 11

par phyelec » 24 Mai 2022, 22:17

Bonjour,

Merci pour l'info.

Avatar de l’utilisateur
ortollj
Membre Rationnel
Messages: 554
Enregistré le: 13 Mai 2009, 10:28

Re: SageMath installation sous windows 10 ou 11

par ortollj » 25 Mai 2022, 09:42

je precise que la commande make peut durer longtemps !, elle a duré plus de 6 heures sur mon vieux PC et moins de 3 heures sur mon nouveau PC.
on peut accelerer le make comme me la preciser Eric Gourgoulhon:
If you have 4 cores on your CPU, you can speed up the installation by typing
MAKE="make -j8" make
The flag -j8 tells to use 8 threads in parallel. Adapt to your CPU (typically use a number of threads that is twice the number of cores).
si j'avais su j'aurais pas venu.

phyelec
Membre Rationnel
Messages: 946
Enregistré le: 06 Mar 2020, 18:47

Re: SageMath installation sous windows 10 ou 11

par phyelec » 25 Mai 2022, 22:27

Merci, très utile, mon CPU à 8 corps.

Avatar de l’utilisateur
ortollj
Membre Rationnel
Messages: 554
Enregistré le: 13 Mai 2009, 10:28

Re: SageMath installation sous windows 10 ou 11

par ortollj » 24 Juil 2022, 12:10

si l'on veut garder les anciennes versions de SageMath:
MAKE installing-from-source
si j'avais su j'aurais pas venu.

 

Retourner vers ϟ Informatique

Qui est en ligne

Utilisateurs parcourant ce forum : Aucun utilisateur enregistré et 3 invités

Tu pars déja ?



Fais toi aider gratuitement sur Maths-forum !

Créé un compte en 1 minute et pose ta question dans le forum ;-)
Inscription gratuite

Identification

Pas encore inscrit ?

Ou identifiez-vous :

Inscription gratuite