Hi Clément,
Thanks for running those commands, the picture is now much clearer.
On Wed Jul 22, 2026 at 3:15 AM CST, Clément Chenevière wrote:
> Here is the output of the `which` commands:
>
>>>> pc:~/sage$ which sage
> /usr/local/bin/sage
>
>>>> pc:~/sage$ ls -l $(which sage)
> lrwxrwxrwx 1 root root 36 janv. 28 2024 /usr/local/bin/sage ->
> /home/ccheneviere/sage/venv/bin/sage
From this, it means the sage you run from anywhere (that is,the one in
your PATH) is not the new one you build.
It is a symbolic link pointing to `/home/ccheneviere/sage/venv/bin/sage`.
And the symlink was created back in January 2024.
>
> When I type `sage --gap` I get an error:
>
>>>> pc:~$ sage --gap
> usage: sage [-h] [-v] [-q] [--simple-prompt] [-V] [-n
> [{jupyter,jupyterlab}]]
> [-c [COMMAND]]
> [file ...]
> sage: error: unrecognized arguments: --gap
>
Well, this fails. The venv-entry-point script doesn't know what `--gap`
means.
> When I do `./sage --gap` in my sage folder, I get the following:
>
>>>> pc:~/sage$ ./sage --gap
> ┌───────┐ GAP 4.15.1 of 2025-10-18
> │ GAP │
https://www.gap-system.org
> └───────┘ Architecture: x86_64-pc-linux-gnu-default64-kv10
> Configuration: gmp 6.3.0, GASMAN, readline
> Loading the library and packages ...
> Packages: GAPDoc 1.6.7, PrimGrp 4.0.1, SmallGrp 1.5.4, TransGrp 3.6.5
> Try '??help' for help. See also '?copyright', '?cite' and '?authors'
> gap> GAPInfo.RootPaths;
> [ "/home/ccheneviere/.gap/", "/home/ccheneviere/sage/local/lib/gap/",
> "/home/ccheneviere/sage/local/share/gap/" ]
>
This works fine, and shows up the GAP 4.15.1. The `GAPInfo.RootPaths;`
command return the gap environment it relies on.
So here is how to fix it:
```
# just test this
/home/ccheneviere/sage/sage --gap
# if it is perfect, we can update the symlink to point to it.
sudo ln -sfn /home/ccheneviere/sage/sage /usr/local/bin/sage
```
If you prefer not to touch system directories, you can simply add an
alias to your shell configuration:
In your `~/.bashrc`, zsh is `~/.zshrc`
add this in the file
alias sage='~/sage/sage'
And run this or open a new terminal
source ~/.bashrc
This way ,whenever you type sage in a terminal, it will runs the same as
of `./sage`
>
> If this helps, here are the relevant lines when I do ./configure:
>
>>>> pc:~/sage$ ./configure
> checking for [...]
> ## -----------------------------------------------------------------------
> ##
> ## Build status for each package:
> ##
> ## -----------------------------------------------------------------------
> ##
> [...]
> gap: SPKG version 4.15.1 is already installed
> gap3: experimental, use "./configure
> --enable-gap3" to install SPKG version 04jul17
> gap_jupyter: no; optional, use "./configure
> --enable-gap_jupyter" to install SPKG version 0.9
> gap_packages: optional, use "./configure
> --enable-gap_packages" to install SPKG version 4.15.1
> [...]
The configure output you showed is just listing optional packages, they
aren't part of the problem, but everything looks fine there.
--
Mellvie