@@ -132,9 +132,8 @@ in the Installation Guide.
132132 - On personal computers, any subdirectory of your :envvar:` HOME `
133133 directory should do.
134134
135- - For example, you could use ` SAGE_ROOT=~/sage/sage-x.y ` , which we
136- will use as the running example below, where ` x.y ` is the
137- current Sage version.
135+ - For example, you could use ` SAGE_ROOT=~/sage/sage ` , which we
136+ will use as the running example below.
138137
139138 - You need at least 10 GB of free disk space.
140139
@@ -152,52 +151,64 @@ in the Installation Guide.
152151 capitalization when changing into :envvar:` SAGE_ROOT ` can lead to build
153152 errors for dependencies requiring exact capitalization in path names.
154153
155- 2 . Download/unpack or clone the sources.
154+ 2 . Clone the sources with ` git ` :
156155
157- - Go to https://www.sagemath.org/download-source.html , select a mirror,
158- and download the file :file: ` sage-x.y.tar.gz ` .
156+ - To check that ` git ` is available, open a terminal and enter
157+ the following command at the shell prompt ( ` $ ` ):
159158
160- This compressed archive file contains the source code for Sage and
161- the source for all programs on which Sage depends.
159+ $ git --version
160+ git version 2.42.0
162161
163- - After downloading the source tarball ` sage-x.y.tar.gz ` into
164- ` ~/sage/ ` :
162+ The exact version does not matter, but if this command gives an error,
163+ install ` git ` using your package manager, using one of these commands :
165164
166- $ cd ~/sage/
167- $ tar xf sage-x.y.tar.gz # adapt x.y; takes a while
165+ $ sudo pacman -S git # on Arch Linux
166+ $ sudo apt-get update && apt-get install git # on Debian/Ubuntu
167+ $ sudo yum install git # on Fedora/Redhat/CentOS
168+ $ sudo zypper install git # on openSUSE
169+ $ sudo xbps-install git # on Void Linux
168170
169- This creates the subdirectory ` sage-x.y ` . Now change into it :
171+ - Create the directory where ` SAGE_ROOT ` should be established :
170172
171- $ cd sage-x.y/ # adapt x.y
173+ $ mkdir -p ~/sage
174+ $ cd ~/sage
172175
173- - [ Git] Alternatively, and required for Sage development, clone the Sage
174- git repository:
176+ - Clone the Sage git repository:
175177
176- $ ORIG=https://github.com/sagemath/sage.git
177- $ git clone -c core.symlinks=true --branch develop --tags $ORIG
178+ $ git clone -c core.symlinks=true --filter blob:none \
179+ --origin upstream --branch develop --tags \
180+ https://github.com/sagemath/sage.git
178181
179- This will create the directory ` sage ` . (See the section
182+ This command obtains the most recent development release.
183+ Replace ` --branch develop ` by ` --branch master ` to select
184+ the most recent stable release instead.
185+
186+ This will create the subdirectory ` ~/sage/sage ` . (See the section
180187 [ Setting up git] ( https://doc.sagemath.org/html/en/developer/git_setup.html )
181188 and the following sections in the Sage Developer's Guide
182189 for more information.)
183190
184- Change into it and pick the branch you need, typically
185- the latest development branch:
191+ - Change into the created subdirectory:
186192
187193 $ cd sage
188- $ git checkout develop
189194
190195 - [ Windows] The Sage source tree contains symbolic links, and the
191196 build will not work if Windows line endings rather than UNIX
192197 line endings are used.
193198
194- Therefore it is crucial that you unpack the source tree from the
195- WSL ` bash ` using the WSL ` tar ` utility and not using other
196- Windows tools (including mingw). Likewise, when using ` git ` , it
197- is recommended (but not necessary) to use the WSL version of
198- ` git ` .
199+ Therefore it is recommended (but not necessary) to use the
200+ WSL version of ` git ` .
201+
202+ 3 . Install system packages.
203+
204+ Either refer for this to the [ section on installation from
205+ source] ( https://doc.sagemath.org/html/en/installation/source.html ) in the
206+ Sage Installation Manual for compilations of system packages
207+ that you can install. When done, skip to step 7 (bootstrapping).
199208
200- 3 . [ Linux, WSL] Install the required minimal build prerequisites.
209+ Alternatively, follow the more fine-grained approach below.
210+
211+ 4 . [ Linux, WSL] Install the required minimal build prerequisites:
201212
202213 - Compilers: ` gcc ` , ` gfortran ` , ` g++ ` (GCC versions from 8.4.0 to 13.x
203214 and recent versions of Clang (LLVM) are supported).
@@ -206,12 +217,12 @@ in the Installation Guide.
206217 for a discussion of suitable compilers.
207218
208219 - Build tools: GNU ` make ` , GNU ` m4 ` , ` perl ` (including
209- `` ExtUtils::MakeMaker ` ` ), ` ranlib ` , ` git ` , ` tar ` , ` bc ` .
220+ ` ExtUtils::MakeMaker ` ), ` ranlib ` , ` git ` , ` tar ` , ` bc ` .
210221 See [ build/pkgs/_ prereq/SPKG.rst] ( build/pkgs/_prereq/SPKG.rst ) for
211222 more details.
212223
213224 - Python 3.4 or later, or Python 2.7, a full installation including
214- ` urllib ` ; but ideally version 3.9.x, 3.10.x, or 3.11.x, which
225+ ` urllib ` ; but ideally version 3.9.x, 3.10.x, 3.11.x, 3.12 .x, which
215226 will avoid having to build Sage's own copy of Python 3.
216227 See [ build/pkgs/python3/SPKG.rst] ( build/pkgs/python3/SPKG.rst )
217228 for more details.
@@ -230,22 +241,25 @@ in the Installation Guide.
230241 [ void.txt] ( build/pkgs/_prereq/distros/void.txt ) , or visit
231242 https://doc.sagemath.org/html/en/reference/spkg/_prereq.html#spkg-prereq
232243
233- 4 . [ Git] If you plan to do Sage development or otherwise work with ticket branches
234- and not only releases, install the bootstrapping prerequisites. See the
235- files in the folder
244+ 5 . Optional: It is recommended that you have both LaTeX and
245+ the ImageMagick tools (e.g. the "convert" command) installed
246+ since some plotting functionality benefits from them.
247+
248+ 6 . [ Development] If you plan to do Sage development or otherwise work with
249+ ticket branches and not only releases, install the bootstrapping
250+ prerequisites. See the files in the folder
236251 [ build/pkgs/_ bootstrap/distros] ( build/pkgs/_bootstrap/distros ) , or
237252 visit
238253 https://doc.sagemath.org/html/en/reference/spkg/_bootstrap.html#spkg-bootstrap
239254
240- 5 . [ Git] If you cloned the Sage repository using ` git ` , bootstrap the
241- source tree using the following command:
255+ 7 . Bootstrap the source tree using the following command:
242256
243257 $ make configure
244258
245- (If the bootstrapping prerequisites are not installed, this command will
246- download a package providing pre-built bootstrap output instead.)
259+ (If the bootstrapping prerequisites are not installed, this command
260+ will download a package providing pre-built bootstrap output instead.)
247261
248- 6 . Sanitize the build environment. Use the command
262+ 8 . Sanitize the build environment. Use the command
249263
250264 $ env
251265
@@ -277,7 +291,7 @@ in the Installation Guide.
277291 can also add it to your shell profile so that it gets run
278292 automatically in all future sessions.)
279293
280- 7 . Optionally, decide on the installation prefix (` SAGE_LOCAL ` ):
294+ 9 . Optionally, decide on the installation prefix (` SAGE_LOCAL ` ):
281295
282296 - Traditionally, and by default, Sage is installed into the
283297 subdirectory hierarchy rooted at ` SAGE_ROOT/local/ ` .
@@ -295,15 +309,11 @@ in the Installation Guide.
295309 installs (` make install ` is a no-op). Therefore the
296310 installation hierarchy must be writable by the user.
297311
298- - See the installation manual for options if you want to
312+ - See the Sage Installation Manual for options if you want to
299313 install into shared locations such as ` /usr/local/ ` .
300314 Do not attempt to build Sage as ` root ` .
301315
302- 8 . Optional: It is recommended that you have both LaTeX and
303- the ImageMagick tools (e.g. the "convert" command) installed
304- since some plotting functionality benefits from them.
305-
306- 9 . Optionally, review the configuration options, which includes
316+ 10 . Optionally, review the configuration options, which includes
307317 many optional packages:
308318
309319 $ ./configure --help
@@ -321,7 +331,7 @@ in the Installation Guide.
321331 a great speedup when switching between different branches, at the
322332 expense of disk space use.
323333
324- 10 . Optional, but highly recommended: Set some environment variables to
334+ 11 . Optional, but highly recommended: Set some environment variables to
325335 customize the build.
326336
327337 For example, the ` MAKE ` environment variable controls whether to
@@ -343,7 +353,7 @@ in the Installation Guide.
343353 building Sage, see [ the installation
344354 guide] ( https://doc.sagemath.org/html/en/installation/source.html#environment-variables ) .
345355
346- 11 . Type ` ./configure ` , followed by any options that you wish to use.
356+ 12 . Type ` ./configure ` , followed by any options that you wish to use.
347357 For example, to build Sage with ` gf2x ` package supplied by Sage,
348358 use ` ./configure --with-system-gf2x=no ` .
349359
@@ -363,60 +373,60 @@ in the Installation Guide.
363373 available; only the most recent releases of your distribution will
364374 have all of these recommended packages.
365375
366- 12 . Optional: If you choose to install the additional system packages,
376+ 13 . Optional: If you choose to install the additional system packages,
367377 a re-run of ` ./configure ` will test whether the versions installed
368378 are usable for Sage; if they are, this will reduce the compilation
369379 time and disk space needed by Sage. The usage of packages may be
370380 adjusted by ` ./configure ` parameters (check again the output of
371381 ` ./configure --help ` ).
372382
373- 13 . Type ` make ` . That's it! Everything is automatic and
383+ 14 . Type ` make ` . That's it! Everything is automatic and
374384 non-interactive.
375385
376386 If you followed the above instructions, in particular regarding the
377387 installation of system packages recommended by the output of
378- ` ./configure ` (step 10 ), and regarding the parallel build (step 9 ),
388+ ` ./configure ` (step 11 ), and regarding the parallel build (step 10 ),
379389 building Sage takes less than one hour on a modern computer.
380390 (Otherwise, it can take much longer.)
381391
382392 The build should work fine on all fully supported platforms. If it
383393 does not, we want to know!
384394
385- 14 . Type ` ./sage ` to try it out. In Sage, try for example ` 2 + 2 ` ,
395+ 15 . Type ` ./sage ` to try it out. In Sage, try for example ` 2 + 2 ` ,
386396 ` plot(x^2) ` , ` plot3d(lambda x, y: x*y, (-1, 1), (-1, 1)) `
387397 to test a simple computation and plotting in 2D and 3D.
388398 Type <kbd >Ctrl</kbd >+<kbd >D</kbd > or ` quit ` to quit Sage.
389399
390- 15 . Optional: Type ` make ptestlong ` to test all examples in the documentation
400+ 16 . Optional: Type ` make ptestlong ` to test all examples in the documentation
391401 (over 200,000 lines of input!) -- this takes from 10 minutes to
392402 several hours. Don't get too disturbed if there are 2 to 3 failures,
393403 but always feel free to email the section of ` logs/ptestlong.log ` that
394404 contains errors to the [ sage-support mailing list] ( https://groups.google.com/group/sage-support ) .
395405 If there are numerous failures, there was a serious problem with your build.
396406
397- 16 . The HTML version of the [ documentation] ( https://doc.sagemath.org/html/en/index.html )
407+ 17 . The HTML version of the [ documentation] ( https://doc.sagemath.org/html/en/index.html )
398408 is built during the compilation process of Sage and resides in the directory
399409 ` local/share/doc/sage/html/ ` . You may want to bookmark it in your browser.
400410
401- 17 . Optional: If you want to build the PDF version of the documentation,
411+ 18 . Optional: If you want to build the PDF version of the documentation,
402412 run ` make doc-pdf ` (this requires LaTeX to be installed).
403413
404- 18 . Optional: Install optional packages of interest to you:
414+ 19 . Optional: Install optional packages of interest to you:
405415 get a list by typing ` ./sage --optional ` or by visiting the
406416 [ packages documentation page] ( https://doc.sagemath.org/html/en/reference/spkg/ ) .
407417
408- 19 . Optional: Create a symlink to the installed ` sage ` script in a
409- directory in your ` PATH ` , for example `` /usr/local ` ` . This will
418+ 20 . Optional: Create a symlink to the installed ` sage ` script in a
419+ directory in your ` PATH ` , for example ` /usr/local ` . This will
410420 allow you to start Sage by typing ` sage ` from anywhere rather than
411421 having to either type the full path or navigate to the Sage
412422 directory and type ` ./sage ` . This can be done by running:
413423
414424 $ sudo ln -s $(./sage -sh -c 'ls $SAGE_ROOT/venv/bin/sage') /usr/local/bin
415425
416- 20 . Optional: Set up SageMath as a Jupyter kernel in an existing Jupyter notebook
426+ 21 . Optional: Set up SageMath as a Jupyter kernel in an existing Jupyter notebook
417427 or JupyterLab installation, as described in [ section
418428 "Launching SageMath"] ( https://doc.sagemath.org/html/en/installation/launching.html )
419- in the installation manual .
429+ in the Sage Installation Manual .
420430
421431Alternative Installation using PyPI
422432---------------
@@ -505,7 +515,7 @@ Directory Layout
505515
506516Simplified directory layout (only essential files/directories):
507517```
508- SAGE_ROOT Root directory (sage-x.y in Sage tarball )
518+ SAGE_ROOT Root directory (create by git clone )
509519├── build
510520│ └── pkgs Every package is a subdirectory here
511521│ ├── 4ti2/
0 commit comments