Hah !
The problem was that, **in addition to** `--enable-giac`, I had to have
`--enable-sagemath_giac` in my configuration. This seems to be new, and had
escaped my attention.
Sorry for the noise...
Le mardi 30 décembre 2025 à 09:50:42 UTC+1, Emmanuel Charpentier a écrit :
> Le lundi 29 décembre 2025 à 20:01:41 UTC+1, Emmanuel Charpentier a écrit :
>
> [ Snip… ]
>
> sage: integrate(cos(x), x, algorithm="fricas") sin(x) sage:
> integrate(cos(x), x, algorithm="giac") integrate(cos(x), x)
>
> The latter is intriguing…
>
> Even more intriguing : trying to reproduce gives yet another error :
> sage: integrate(cos(x), algorithm="giac")
> ---------------------------------------------------------------------------
> ModuleNotFoundError Traceback (most recent call last) File
> /usr/local/sage-10.9.beta1/src/sage/symbolic/integration/external.py:251,
> in libgiac_integrator(expression, v, a, b) 250 try: --> 251 from
> sage.libs.giac import libgiac 252 except ImportError: 253 # If libgiac is
> not available, return a symbolic answer 254 # (without actually integrating
> anything). This is essentially 255 # the failure case of any integration:
> see below for what we 256 # do if libgiac is *available* but unable to do
> much. File /usr/local/sage-10.9.beta1/src/sage/libs/giac/__init__.py:2 1 #
> sagemath_giac split its __init__.py into these two ----> 2 from
> sagemath_giac.gb import * 3 from sagemath_giac.context import *
> ModuleNotFoundError: No module named 'sagemath_giac' During handling of the
> above exception, another exception occurred: TypeError Traceback (most
> recent call last) File sage/symbolic/function.pyx:537, in
> sage.symbolic.function.Function.__call__() File
> sage/structure/parent.pyx:1189, in sage.structure.parent.Parent.coerce()
> File sage/structure/parent.pyx:1219, in
> sage.structure.parent.Parent.coerce() TypeError: no canonical coercion from
> <class 'NoneType'> to Symbolic Ring During handling of the above exception,
> another exception occurred: TypeError Traceback (most recent call last)
> Cell In[1], line 1 ----> 1 integrate(cos(x), algorithm="giac") File
> /usr/local/sage-10.9.beta1/src/sage/misc/functional.py:789, in integral(x,
> *args, **kwds) 650 """ 651 Return an indefinite or definite integral of an
> object ``x``. 652 (...) 786 0 787 """ 788 if hasattr(x, 'integral'): -->
> 789 return x.integral(*args, **kwds) 790 else: 791 from sage.symbolic.ring
> import SR File sage/symbolic/expression.pyx:13184, in
> sage.symbolic.expression.Expression.integral() File
> /usr/local/sage-10.9.beta1/src/sage/symbolic/integration/integral.py:1067,
> in integrate(expression, v, a, b, algorithm, hold) 1065 if not integrator:
> 1066 raise ValueError("Unknown algorithm: %s" % algorithm) -> 1067 return
> integrator(expression, v, a, b) 1068 if a is None: 1069 return
> indefinite_integral(expression, v, hold=hold) File
> /usr/local/sage-10.9.beta1/src/sage/symbolic/integration/external.py:257,
> in libgiac_integrator(expression, v, a, b) 251 from sage.libs.giac import
> libgiac 252 except ImportError: 253 # If libgiac is not available, return a
> symbolic answer 254 # (without actually integrating anything). This is
> essentially 255 # the failure case of any integration: see below for what
> we 256 # do if libgiac is *available* but unable to do much. --> 257 return
> expression.integrate(v, a, b, hold=True) 259 from sage.libs.giac.giac
> import Pygen 260 # We call Pygen on first argument because otherwise some
> 261 # expressions involving derivatives result in doctest failures in 262 #
> sage/interfaces/sympy.py File sage/symbolic/expression.pyx:13184, in
> sage.symbolic.expression.Expression.integral() File
> /usr/local/sage-10.9.beta1/src/sage/symbolic/integration/integral.py:1069,
> in integrate(expression, v, a, b, algorithm, hold) 1067 return
> integrator(expression, v, a, b) 1068 if a is None: -> 1069 return
> indefinite_integral(expression, v, hold=hold) 1070 else: 1071 return
> definite_integral(expression, v, a, b, hold=hold) File
> sage/symbolic/function.pyx:1061, in
> sage.symbolic.function.BuiltinFunction.__call__() File
> sage/symbolic/function.pyx:550, in
> sage.symbolic.function.Function.__call__() TypeError: cannot coerce
> arguments: no canonical coercion from <class 'NoneType'> to Symbolic Ring
>
> But :
> sage: cos(x)._giac_().integrate(x._giac_())._sage_() sin(x)
>
> The problem seems to be in the Sage-Giac interface, not in giac… The key
> hint seems to be
> ModuleNotFoundError: No module named 'sagemath_giac'
>
> HTH,
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"sage-release" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/sage-release/06271133-c0ce-4b4f-a3c1-652c4e3a259bn%40googlegroups.com.