From: "François Bissey" <f.r.bissey@massey.ac.nz>
To: gentoo-science@lists.gentoo.org
Subject: Re: [gentoo-science] [sage-on-gentoo]some strange problem with sympy
Date: Mon, 18 Oct 2010 10:39:12 +1300 [thread overview]
Message-ID: <201010181039.12889.f.r.bissey@massey.ac.nz> (raw)
In-Reply-To: <201010172327.56199.f.r.bissey@massey.ac.nz>
Hi,
I think I found the root cause of the problem. sympy's setup.py
has the following line:
import sympy
it is the line triggering everything. I don't know if it calls the already
installed system sympy or the build copy (but I could find out).
The matter is it is reproducible by just opening a python2.6 shell
and typing "import sympy" and you will get the same message.
Try "import mpmath" and you will get the exact same error. This is
because the problem comes from mpmath and in the case of sympy
the copy of mpmath that is shipped with it.
mpmath ships a file which will try to load sage: libintmath.py, it also
tries to load gmpy if it is available. I don't know if that gives rise to
similar problems:
import math
from bisect import bisect
from settings import MODE, gmpy, sage, MP_BASE, MP_ONE, MP_ZERO
So we have to look in settings.py :
gmpy = None
sage = None
MODE = 'python'
MP_BASE = long
if 'MPMATH_NOGMPY' not in os.environ:
try:
import gmpy
if gmpy.version() >= '1.03':
MODE = 'gmpy'
MP_BASE = gmpy.mpz
except:
pass
if 'MPMATH_NOSAGE' not in os.environ:
try:
import sage.all
if hasattr(sage.all.Integer, "trailing_zero_bits"):
sage = sage.all
MODE = 'sage'
MP_BASE = sage.Integer
except:
pass
-----------------------------
This is all a little bit convoluted mpmath is used by sage and now it looks
like mpmath can use sage.
Anyway exporting MPMATH_NOSAGE=1 in the ebuild should solve that particular
problem.
Francois
next prev parent reply other threads:[~2010-10-17 21:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-17 10:27 [gentoo-science] [sage-on-gentoo]some strange problem with sympy François Bissey
2010-10-17 21:39 ` François Bissey [this message]
2010-10-17 23:42 ` Steven Trogdon
2010-10-18 7:54 ` François Bissey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201010181039.12889.f.r.bissey@massey.ac.nz \
--to=f.r.bissey@massey.ac.nz \
--cc=gentoo-science@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox