Sage 10.6 - Error during compilation.

153 views
Skip to first unread message

Topaze

unread,
Apr 21, 2025, 11:34:47 AMApr 21
to sage-support
Hi there.

I have a problem with numpy...
config.log
install.log

Dima Pasechnik

unread,
Apr 22, 2025, 11:48:35 PMApr 22
to sage-s...@googlegroups.com
this does look like some kind of hardware issue:

> sed: couldn't flush stdout: Ressource temporairement non disponible
> make[4]: *** [Makefile:3412 : numpy-SAGE_VENV-no-deps] Erreur 141

Try restarting make, hopefully it will finish building numpy




On Mon, Apr 21, 2025 at 10:34 AM Topaze <topa...@gmail.com> wrote:
Hi there.

I have a problem with numpy...

--
You received this message because you are subscribed to the Google Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/sage-support/d63fb44c-f389-48f5-8662-212c233d2051n%40googlegroups.com.

Topaze

unread,
Apr 24, 2025, 9:24:13 AMApr 24
to sage-support

OK, so I started from scratch. I've got lots of disk space and memory, so I don't know why make stumbled. And twice in the same place, hence my report. But this time I managed to compile without any problem (did make -j 1 (parameter “1”, no more) help?). So compilation went smoothly the third time.

But now sage won't run, as you can see. And it's still something that involves numpy,.

--------------------------------------------------------------------------------------------------------------------------

/home/mainuser/software/sage-10.6/bin/sage-venv-config:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  __import__('pkg_resources').require('sagemath-standard==10.6')
Traceback (most recent call last):
  File "/home/mainuser/software/sage-10.6/lib/python3.11/site-packages/pkg_resources/__init__.py", line 656, in _build_master
    ws.require(__requires__)
  File "/home/mainuser/software/sage-10.6/lib/python3.11/site-packages/pkg_resources/__init__.py", line 1063, in require
    needed = self.resolve(parse_requirements(requirements))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mainuser/software/sage-10.6/lib/python3.11/site-packages/pkg_resources/__init__.py", line 890, in resolve
    dist = self._resolve_dist(
           ^^^^^^^^^^^^^^^^^^^
  File "/home/mainuser/software/sage-10.6/lib/python3.11/site-packages/pkg_resources/__init__.py", line 936, in _resolve_dist
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (numpy 2.2.3 (/home/mainuser/software/sage-10.6/lib/python3.11/site-packages), Requirement.parse('numpy<2,>=1.21'), {'matplotlib'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/mainuser/software/sage-10.6/bin/sage-venv-config", line 4, in <module>
    __import__('pkg_resources').require('sagemath-standard==10.6')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mainuser/software/sage-10.6/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3656, in <module>
    @_call_aside
     ^^^^^^^^^^^
  File "/home/mainuser/software/sage-10.6/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3640, in _call_aside
    f(*args, **kwargs)
  File "/home/mainuser/software/sage-10.6/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3669, in _initialize_master_working_set
    working_set = _declare_state('object', 'working_set', WorkingSet._build_master())
                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mainuser/software/sage-10.6/lib/python3.11/site-packages/pkg_resources/__init__.py", line 658, in _build_master
    return cls._build_from_requirements(__requires__)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mainuser/software/sage-10.6/lib/python3.11/site-packages/pkg_resources/__init__.py", line 671, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mainuser/software/sage-10.6/lib/python3.11/site-packages/pkg_resources/__init__.py", line 890, in resolve
    dist = self._resolve_dist(
           ^^^^^^^^^^^^^^^^^^^
  File "/home/mainuser/software/sage-10.6/lib/python3.11/site-packages/pkg_resources/__init__.py", line 936, in _resolve_dist
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (numpy 2.2.3 (/home/mainuser/software/sage-10.6/lib/python3.11/site-packages), Requirement.parse('numpy<2,>=1.21'), {'matplotlib'})
/home/mainuser/software/sage-10.6/bin/sage-notebook:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  __import__('pkg_resources').require('sagemath-standard==10.6')
Traceback (most recent call last):
  File "/home/mainuser/software/sage-10.6/lib/python3.11/site-packages/pkg_resources/__init__.py", line 656, in _build_master
    ws.require(__requires__)
  File "/home/mainuser/software/sage-10.6/lib/python3.11/site-packages/pkg_resources/__init__.py", line 1063, in require
    needed = self.resolve(parse_requirements(requirements))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mainuser/software/sage-10.6/lib/python3.11/site-packages/pkg_resources/__init__.py", line 890, in resolve
    dist = self._resolve_dist(
           ^^^^^^^^^^^^^^^^^^^
  File "/home/mainuser/software/sage-10.6/lib/python3.11/site-packages/pkg_resources/__init__.py", line 936, in _resolve_dist
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (numpy 2.2.3 (/home/mainuser/software/sage-10.6/lib/python3.11/site-packages), Requirement.parse('numpy<2,>=1.21'), {'matplotlib'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/mainuser/software/sage-10.6/bin/sage-notebook", line 4, in <module>
    __import__('pkg_resources').require('sagemath-standard==10.6')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mainuser/software/sage-10.6/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3656, in <module>
    @_call_aside
     ^^^^^^^^^^^
  File "/home/mainuser/software/sage-10.6/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3640, in _call_aside
    f(*args, **kwargs)
  File "/home/mainuser/software/sage-10.6/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3669, in _initialize_master_working_set
    working_set = _declare_state('object', 'working_set', WorkingSet._build_master())
                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mainuser/software/sage-10.6/lib/python3.11/site-packages/pkg_resources/__init__.py", line 658, in _build_master
    return cls._build_from_requirements(__requires__)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mainuser/software/sage-10.6/lib/python3.11/site-packages/pkg_resources/__init__.py", line 671, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mainuser/software/sage-10.6/lib/python3.11/site-packages/pkg_resources/__init__.py", line 890, in resolve
    dist = self._resolve_dist(
           ^^^^^^^^^^^^^^^^^^^
  File "/home/mainuser/software/sage-10.6/lib/python3.11/site-packages/pkg_resources/__init__.py", line 936, in _resolve_dist
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (numpy 2.2.3 (/home/mainuser/software/sage-10.6/lib/python3.11/site-packages), Requirement.parse('numpy<2,>=1.21'), {'matplotlib'})

Dima Pasechnik

unread,
Apr 24, 2025, 2:04:30 PMApr 24
to sage-support, sage-devel, sage-release, Tobias Diez, Volker Braun
Sage 10.6 was released with numpy 2.2.3, and matplotlib 3.8.0 from 2023, which is incompatible with numpy 2 (the compatibility was added in 3.8.4).
While 10.6.rc0 was released, this problem was noticed (see https://groups.google.com/g/sage-release/c/TkPM0xL2fFA/m/LB0dT9PLAwAJ)
but was not acted upon until 10.6 was out.

I have no idea how this could have happened (besides the lack of testing), and not enough eyes on these things. Volker, do you have an idea how it worked?

(I argued for years that PyPI packages are best pip-installed from PyPI, not with our poor effort to mimick PyPI and version resolving capabilities of PyPI, but I was always shouted down
by these who value status quo.)

Dima




--
You received this message because you are subscribed to the Google Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.

Dima Pasechnik

unread,
Apr 24, 2025, 2:17:16 PMApr 24
to sage-s...@googlegroups.com
On Thu, Apr 24, 2025 at 8:24 AM Topaze <topa...@gmail.com> wrote:

OK, so I started from scratch. I've got lots of disk space and memory, so I don't know why make stumbled. And twice in the same place, hence my report. But this time I managed to compile without any problem (did make -j 1 (parameter “1”, no more) help?). So compilation went smoothly the third time.

But now sage won't run, as you can see. And it's still something that involves numpy,.

As you see from my other reply, it's a mess with 10.6 in this respect.

You probably can fix this by running

./sage --pip install matplotlib


Or, if you did a git checkout of 10.6, you might try to merge the update   on
(by doing "git pull origin pull/39789/head)
and run "make build" again.


--
You received this message because you are subscribed to the Google Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.

Enrique Artal

unread,
Apr 24, 2025, 6:02:26 PMApr 24
to sage-support
In a jupyterhub server we have for teaching, there were related problems with 10.6, in particular show got no output and help gave errors. Applying PR 39789 (present in 10.7beta's) solved the problem. These were the steps:
1.- Save a patch file of this PR, e.g., with wget https://github.com/sagemath/sage/pull/39789.patch
2.- Apply the patch in SAGE_ROOT: patch -p1 -i 39789.patch
3.- make

Topaze

unread,
Apr 25, 2025, 3:18:27 AMApr 25
to sage-support

I got another error.

I still have version 10.5 installed and fully functional, so I'm not really in a hurry.

Maybe I should wait for this problem to be fixed upstream?


---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
mainuser@station1:~/software/sage-10.6_source$ ./sage --pip install matplotlib
Requirement already satisfied: matplotlib in /home/mainuser/software/sage-10.6/lib/python3.11/site-packages (3.8.0)
Requirement already satisfied: contourpy>=1.0.1 in /home/mainuser/software/sage-10.6/lib/python3.11/site-packages (from matplotlib) (1.1.1)
Requirement already satisfied: cycler>=0.10 in /home/mainuser/software/sage-10.6/lib/python3.11/site-packages (from matplotlib) (0.11.0)
Requirement already satisfied: fonttools>=4.22.0 in /home/mainuser/software/sage-10.6/lib/python3.11/site-packages (from matplotlib) (4.42.1)
Requirement already satisfied: kiwisolver>=1.0.1 in /home/mainuser/software/sage-10.6/lib/python3.11/site-packages (from matplotlib) (1.4.5)
Collecting numpy<2,>=1.21 (from matplotlib)
  Downloading numpy-1.26.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (61 kB)
Requirement already satisfied: packaging>=20.0 in /home/mainuser/software/sage-10.6/lib/python3.11/site-packages (from matplotlib) (24.1)
Requirement already satisfied: pillow>=6.2.0 in /home/mainuser/software/sage-10.6/lib/python3.11/site-packages (from matplotlib) (11.1.0)
Requirement already satisfied: pyparsing>=2.3.1 in /home/mainuser/software/sage-10.6/lib/python3.11/site-packages (from matplotlib) (3.1.2)
Requirement already satisfied: python-dateutil>=2.7 in /home/mainuser/software/sage-10.6/lib/python3.11/site-packages (from matplotlib) (2.9.0.post0)
Requirement already satisfied: six>=1.5 in /home/mainuser/software/sage-10.6/lib/python3.11/site-packages (from python-dateutil>=2.7->matplotlib) (1.16.0)
Downloading numpy-1.26.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.3 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 18.3/18.3 MB 2.1 MB/s eta 0:00:00
Installing collected packages: numpy
  Attempting uninstall: numpy
    Found existing installation: numpy 2.2.3
    Uninstalling numpy-2.2.3:
      Successfully uninstalled numpy-2.2.3
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
pythran 0.17.0 requires gast~=0.6.0, but you have gast 0.5.4 which is incompatible.
Successfully installed numpy-1.26.4

Dima Pasechnik

unread,
Apr 25, 2025, 3:15:17 PMApr 25
to sage-s...@googlegroups.com
On Fri, Apr 25, 2025 at 2:18 AM Topaze <topa...@gmail.com> wrote:

I got another error.

I still have version 10.5 installed and fully functional, so I'm not really in a hurry.

Maybe I should wait for this problem to be fixed upstream?

this is all fixed in the latest Sage beta, 10.7.beta1.
IMHO we should have 10.6.1 release to fix this, but, well...


---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
mainuser@station1:~/software/sage-10.6_source$ ./sage --pip install matplotlib
Requirement already satisfied: matplotlib in /home/mainuser/software/sage-10.6/lib/python3.11/site-packages (3.8.0)

Oops, sorry, I should have told you to first run

    ./sage --pip uninstall matplotlib

(how have you even ended up with old, not the one prescribed by Sage 10.6, matplotlib, installed?)

if you run

    ./sage --pip uninstall matplotlib numpy

followed by

     ./sage --pip install matplotlib numpy

you hopefully will get it fixed.

If not, then you need to apply the patch, and 
trigger rebuilds of matplotlib and numpy.

The easiest woud be to clean everything by

      make distclean

and start building again.




Requirement already satisfied: contourpy>=1.0.1 in /home/mainuser/software/sage-10.6/lib/python3.11/site-packages (from matplotlib) (1.1.1)
Requirement already satisfied: cycler>=0.10 in /home/mainuser/software/sage-10.6/lib/python3.11/site-packages (from matplotlib) (0.11.0)
Requirement already satisfied: fonttools>=4.22.0 in /home/mainuser/software/sage-10.6/lib/python3.11/site-packages (from matplotlib) (4.42.1)
Requirement already satisfied: kiwisolver>=1.0.1 in /home/mainuser/software/sage-10.6/lib/python3.11/site-packages (from matplotlib) (1.4.5)
Collecting numpy<2,>=1.21 (from matplotlib)
  Downloading numpy-1.26.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (61 kB)
Requirement already satisfied: packaging>=20.0 in /home/mainuser/software/sage-10.6/lib/python3.11/site-packages (from matplotlib) (24.1)
Requirement already satisfied: pillow>=6.2.0 in /home/mainuser/software/sage-10.6/lib/python3.11/site-packages (from matplotlib) (11.1.0)
Requirement already satisfied: pyparsing>=2.3.1 in /home/mainuser/software/sage-10.6/lib/python3.11/site-packages (from matplotlib) (3.1.2)
Requirement already satisfied: python-dateutil>=2.7 in /home/mainuser/software/sage-10.6/lib/python3.11/site-packages (from matplotlib) (2.9.0.post0)
Requirement already satisfied: six>=1.5 in /home/mainuser/software/sage-10.6/lib/python3.11/site-packages (from python-dateutil>=2.7->matplotlib) (1.16.0)
Downloading numpy-1.26.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.3 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 18.3/18.3 MB 2.1 MB/s eta 0:00:00
Installing collected packages: numpy
  Attempting uninstall: numpy
    Found existing installation: numpy 2.2.3
    Uninstalling numpy-2.2.3:
      Successfully uninstalled numpy-2.2.3
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
pythran 0.17.0 requires gast~=0.6.0, but you have gast 0.5.4 which is incompatible.
Successfully installed numpy-1.26.4

--
You received this message because you are subscribed to the Google Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.

Topaze

unread,
Apr 28, 2025, 7:50:13 AMApr 28
to sage-support

As a precaution, I deleted the .sage directory before and then install/uninstall matplotlib/numpy did the job, as you suggested. And now everything works.

Thanks for your help !

Reply all
Reply to author
Forward
0 new messages