Skip to content

Cython is broken in conda build #39250

@TernaryM01

Description

@TernaryM01

Steps To Reproduce

  1. Install SageMath using conda/mamba: mamba create -n sagemath sage python=3.11.11
  2. Launch Jupyter Lab using either jupyter lab or sage -n jupyterlab (while sage conda env is active).
  3. Try to run any Cython code:
%%cython
from libc.math cimport cos, sin
cimport cython

@cython.boundscheck(False)
@cython.wraparound(False)
cpdef intersection(...):
  ...

Expected Behavior

Cython code gets compiled.

Actual Behavior

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
File ~/miniconda3/envs/sagemath/lib/python3.11/site-packages/sage/misc/cachefunc.pyx:1010, in sage.misc.cachefunc.CachedFunction.__call__ (build/cythonized/sage/misc/cachefunc.c:8371)()
   1009 try:
-> 1010     return self.cache[k]
   1011 except TypeError:  # k is not hashable

KeyError: ((), ())

During handling of the above exception, another exception occurred:

PackageNotFoundError                      Traceback (most recent call last)

. . .

PackageNotFoundError: gdlib not found

Additional Information

This bug has been reported by someone else here.

Environment

  • OS: Ubuntu 22.04 (Windows WSL2)
  • Sage Versions tried: 10.4, 10.3, 10.2, 9.8 (but older installation of 9.8 used to work)
  • Python Versions tried: 3.12.8, 3.11.11, 3.10.16

Checklist

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
  • I have read the documentation and troubleshoot guide

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions