Issue 215 in mpmath: python-mpmath fails if sage packages installed

3 views
Skip to first unread message

mpm...@googlecode.com

unread,
Nov 10, 2011, 9:55:59 AM11/10/11
to mpmath...@googlegroups.com
Status: New
Owner: ----

New issue 215 by paulo.ce...@gmail.com: python-mpmath fails if sage
packages installed
http://code.google.com/p/mpmath/issues/detail?id=215

Example of execution:

$ rpm -q sagemath
sagemath-4.7.2-2-mdv2012.0.x86_64
$ export MPMATH_NOSAGE=1
$ python

Python 2.7.2 (default, Aug 30 2011, 03:39:21)
[GCC 4.6.1 20110826 (Mandriva)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mpmath
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/site-packages/mpmath/__init__.py", line 6, in
<module>
from .ctx_mp import MPContext
File "/usr/lib/python2.7/site-packages/mpmath/ctx_mp.py", line 48, in
<module>
from sage.libs.mpmath.ext_main import Context as BaseMPContext
File "parent.pxd", line 11, in init sage.libs.mpmath.ext_main
(sage/libs/mpmath/ext_main.c:24996)
File "element.pxd", line 12, in init sage.structure.parent
(sage/structure/parent.c:21563)
File "element.pyx", line 184, in init sage.structure.element
(sage/structure/element.c:28577)
File "/usr/lib64/python2.7/site-packages/sage/misc/sageinspect.py", line
161, in <module>
SAGE_ROOT = os.environ["SAGE_ROOT"]
File "/usr/lib64/python2.7/UserDict.py", line 23, in __getitem__
raise KeyError(key)
KeyError: 'SAGE_ROOT'


I think it should need some different machinery to know if
should or not attempt to load sage modules.


mpm...@googlecode.com

unread,
Nov 10, 2011, 10:06:08 AM11/10/11
to mpmath...@googlegroups.com

Comment #1 on issue 215 by fredrik....@gmail.com: python-mpmath fails if

MPMATH_NOSAGE=1 *should* be fixed already in the svn version of mpmath. Can
you verify this?


mpm...@googlecode.com

unread,
Nov 10, 2011, 10:25:24 AM11/10/11
to mpmath...@googlegroups.com

Comment #2 on issue 215 by paulo.ce...@gmail.com: python-mpmath fails if

Yes, I confirm it is fixed. Actually, it appears to work
regardless of setting or not MPMATH_NOSAGE=1 when
sage is installed.


mpm...@googlecode.com

unread,
Jun 18, 2013, 8:37:23 PM6/18/13
to mpmath...@googlegroups.com

Comment #3 on issue 215 by paulo.ce...@gmail.com: python-mpmath fails if
The problem happens again, now in my Fedora sagemath package:
https://bugzilla.redhat.com/show_bug.cgi?id=974769
Can only "import mpmath" in python if under "sage -sh".
Apparently the MPMATH_NOSAGE environment variable is
also ignored.


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages