Yes, that error is due to sympy-0.7.6 bundling mpmath. That's why patches were needed with 0.7.5 in Sage. So, either William should install git master using pip, or apply the existing patches in build/ to 0.7.6.
On Thursday, January 8, 2015 at 9:41:06 PM UTC+1, Ondřej Čertík wrote: > On Thu, Jan 8, 2015 at 12:02 PM, William Stein <wst...@gmail.com> wrote: > > On Thu, Jan 8, 2015 at 10:16 AM, Андрей Ширшов <sh.andr....@gmail.com> > > wrote: > >> Hello! > >> There is the following example on > >> http://docs.sympy.org/latest/modules/sets.html: > >> > >>>>> from sympy import FiniteSet, EmptySet > >>>>> A = EmptySet() > >>>>> A.powerset() > >> {EmptySet()} > >>>>> A = FiniteSet(1, 2) > >>>>> A.powerset() == FiniteSet(FiniteSet(1), FiniteSet(2), FiniteSet(1, 2), > >>>>> EmptySet()) > >> True > >> > >> > >> If you'll try this code in SMC you will get error, that "'EmptySet' object > >> has no attribute 'powerset'". Now in SMC sympy version is 0.7.4, > >> while this example seems to be for sympy version 0.7.6 > >> > >> Please update sympy for Sage and SMC. > >> > >> Best regards, Andrei > > > > I tried pip installing the latest version and it breaks everything > > (see below). This request should go to sage-devel, by the way. > > > > > > /projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/sage/libs/mpmath/ext_main.pyx > > in init sage.libs.mpmath.ext_main > > (build/cythonized/sage/libs/mpmath/ext_main. > > c:29967)() > > > > /usr/local/sage/sage-6.4/local/lib/python2.7/site-packages/mpmath/__init__.py > > in <module>() > > 4 > > 5 from .ctx_fp import FPContext > > ----> 6 from .ctx_mp import MPContext > > 7 from .ctx_iv import MPIntervalContext > > 8 > > > > /usr/local/sage/sage-6.4/local/lib/python2.7/site-packages/mpmath/ctx_mp.py > > in <module>() > > 47 from sage.libs.mpmath.ext_main import Context as BaseMPContext > > 48 # pickle hack > > ---> 49 import sage.libs.mpmath.ext_main as _mpf_module > > 50 else: > > 51 from .ctx_mp_python import PythonMPContext as BaseMPContext > > > > AttributeError: 'module' object has no attribute 'ext_main' > > Is that a bug in sympy? > > Note that in the latest git master, we removed mpmath from sympy and > now simply depend on it. So since Sage ships mpmath, sympy would just > use it. Once a new sympy release is made, then one will have to > account for this change (the latest release as of today is 0.7.6 and > that still includes its own mpmath, which maybe clashes with the > mpmath in sage in the above stacktrace?). > > Ondrej -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.