Re: [sage-support] Sage 10.6 - Error during compilation: matplotlib/numpy incompatibility

29 views
Skip to first unread message

Dima Pasechnik

unread,
Apr 24, 2025, 2:04:22 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




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,.

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

/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'})

--
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/23e244eb-d407-401c-bcc2-9dbb0a43d146n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages