> On   10/18/10 - 06:47:25, François Bissey wrote:
> > After sympy I would like testing report on mpmath.
> > 
> > mpmath has an interesting relationship with sage.
> > sage includes mpmath and if mpmath finds sage it uses bits of it.
> > 
> > So I'd like to know what sage-on-gentoo users get when
> > they do "import mpmath" from a python2.6 shell.
> > I'd like reports of success as well as error along with
> > the version of sage installed (4.5.3, 4.6alpha3 or other).
> > 
> > Thanks,
> > Francois
> 
> Here with Sage 4.5.3 from a python shell; import sage.all, import sympy
> or import mpmath all produce the expected result - one is returned to
> the python prompt after the import. With Sage 4.6alpha3 if each import
> is performed from a separate python shell then each import returns
> 
> Traceback (most recent call last):
>    File "/usr/bin/sage-cleaner", line 25, in <module>
>      DOT_SAGE = os.environ['DOT_SAGE']
>    File "/usr/lib/python2.6/UserDict.py", line 22, in __getitem__
>      raise KeyError(key)
> KeyError: 'DOT_SAGE'
> 
> If from the same python shell the three imports are performed then only
> the first import returns the Traceback.
> 
Thank you Steve,

Could you send me the result of 
printenv | grep SAGE
from the machine running sage-4.5.3. For mpmath with sage-4.6alpha3 
I was expecting this error:
>>> import mpmath
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/site-packages/mpmath/__init__.py", line 6, in 
<module>
    from ctx_mp import MPContext
  File "/usr/lib/python2.6/site-packages/mpmath/ctx_mp.py", line 48, in 
<module>
    from sage.libs.mpmath.ext_main import Context as BaseMPContext
  File "integer.pxd", line 9, in init sage.libs.mpmath.ext_main 
(sage/libs/mpmath/ext_main.c:22894)
  File "integer.pyx", line 165, in init sage.rings.integer 
(sage/rings/integer.c:33926)
  File "/usr/lib/python2.6/site-packages/sage/rings/infinity.py", line 200, in 
<module>
    import sage.rings.rational
  File "rational.pyx", line 70, in init sage.rings.rational 
(sage/rings/rational.c:25264)
  File "real_mpfr.pyx", line 1, in init sage.rings.real_mpfr 
(sage/rings/real_mpfr.c:31325)
  File "complex_number.pxd", line 8, in init sage.libs.mpmath.utils 
(sage/libs/mpmath/utils.c:7374)
  File "complex_double.pxd", line 13, in init sage.rings.complex_number 
(sage/rings/complex_number.c:18312)
  File "complex_double.pyx", line 95, in init sage.rings.complex_double 
(sage/rings/complex_double.c:16534)
  File "/usr/lib/python2.6/site-packages/sage/rings/complex_field.py", line 89, 
in ComplexField
    C = ComplexField_class(prec)
  File "/usr/lib/python2.6/site-packages/sage/rings/complex_field.py", line 
187, in __init__
    ParentWithGens.__init__(self, self._real_field(), ('I',), False, category = 
Fields())
  File "/usr/lib/python2.6/site-packages/sage/rings/complex_field.py", line 
240, in _real_field
    self.__real_field = real_mpfr.RealField(self._prec)
  File "real_mpfr.pyx", line 267, in sage.rings.real_mpfr.RealField 
(sage/rings/real_mpfr.c:4222)
TypeError: 'NoneType' object is unsubscriptable
>

----------------
I posted about it on the sage-release, where we talk about the sage-4.6 pre 
releases, and no one else has the problem so far. If you don't have it either
that may be a problem on my machine.

Francois

Reply via email to