From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1P7ax7-0006qt-IW for garchives@archives.gentoo.org; Sun, 17 Oct 2010 21:39:37 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E7830E0829; Sun, 17 Oct 2010 21:39:15 +0000 (UTC) Received: from mxi2.callplus.net.nz (mx194.callplus.net.nz [202.180.66.194]) by pigeon.gentoo.org (Postfix) with ESMTP id 7A181E0829 for ; Sun, 17 Oct 2010 21:39:15 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAEsKu0x8xQFN/2dsb2JhbAChKnLAIIVJBIpK Received: from 124-197-1-77.callplus.net.nz (HELO vrooom.localnet) ([124.197.1.77]) by ismtp02.callplus.net.nz with ESMTP; 18 Oct 2010 10:39:13 +1300 From: =?iso-8859-1?q?Fran=E7ois_Bissey?= 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 User-Agent: KMail/1.13.5 (Linux/2.6.32-gentoo-r7; KDE/4.4.5; i686; ; ) References: <201010172327.56199.f.r.bissey@massey.ac.nz> In-Reply-To: <201010172327.56199.f.r.bissey@massey.ac.nz> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-science@lists.gentoo.org Reply-to: gentoo-science@lists.gentoo.org MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201010181039.12889.f.r.bissey@massey.ac.nz> X-Archives-Salt: b6e4f7d3-98f5-46a1-ab96-1e569393d2ac X-Archives-Hash: 7b0c1e648b078ccc15a4eb2d0aa3fab3 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