Polytool upgrade3/10/2023 What happens is that at the first attempt the following is raised: To be specific, at the moment it's not possible to import anything from sympy. ctx_mp_python import PythonMPContext as BaseMPContext ++ from _main import Context as BaseMPContext +- from _main import Context as BaseMPContext I tried this patch but the results are the same:ĭiff -git a/build/pkgs/sympy/patches/import-extmain.patch b/build/pkgs/sympy/patches/import-extmain.patch It does not work to simply catch the error and import again, while it works when in a fresh Sage with 0.7.4. So it seems ext_main has to be imported in the right place and there was somewhere an import in sympy-0.7.4 that made that version work but that was changed in 0.7.5. This and the 0.7.5 failure both can be cured for example with > 49 import _main as _mpf_moduleĥ1 from. home/ralf/sage/local/lib/python2.7/site-packages/mpmath/ctx_mp.py in ()Ĥ7 from _main import Context as BaseMPContext home/ralf/sage/local/lib/python2.7/site-packages/mpmath/_init_.py in () ![]() home/ralf/sage/ext_main.pyx in init _main (build/cythonized/sage/libs/mpmath/ext_main.c:28725)() ![]() Sage: import _main as _mpf_moduleĪttributeError Traceback (most recent call last) Import _main as _mpf_moduleĪttributeError: 'module' object has no attribute 'ext_main'Įven with sympy-0.7.4 in a fresh Sage I get evalf import EvalfMixin, pure_complexįile "/home/ralf/sage/local/lib/python2.7/site-packages/sympy/core/evalf.py", line 9, in įile "/home/ralf/sage/local/lib/python2.7/site-packages/sympy/mpmath/_init_.py", line 6, in įile "/home/ralf/sage/local/lib/python2.7/site-packages/sympy/mpmath/ctx_mp.py", line 47, in įrom _main import Context as BaseMPContextįile "ext_main.pyx", line 38, in init _main (build/cythonized/sage/libs/mpmath/ext_main.c:28725)įile "/home/ralf/sage/local/lib/python2.7/site-packages/mpmath/_init_.py", line 6, in įile "/home/ralf/sage/local/lib/python2.7/site-packages/mpmath/ctx_mp.py", line 49, in Self.dispatcher = DocTestDispatcher(self)įile "/home/ralf/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 1335, in _init_įile "/home/ralf/sage/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 113, in init_sageįrom import stringPictįile "/home/ralf/sage/local/lib/python2.7/site-packages/sympy/_init_.py", line 32, in įile "/home/ralf/sage/local/lib/python2.7/site-packages/sympy/core/_init_.py", line 8, in įile "/home/ralf/sage/local/lib/python2.7/site-packages/sympy/core/expr.py", line 7, in įrom. File "/home/ralf/sage/src/bin/sage-runtests", line 87, in įile "/home/ralf/sage/local/lib/python2.7/site-packages/sage/doctest/control.py", line 904, in runįile "/home/ralf/sage/local/lib/python2.7/site-packages/sage/doctest/control.py", line 674, in run_doctests
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |