I am trying to import only the Sage functions needed as is done in the Sage source code, but I am running into issues. For example, (running sage -python
),
>>> from sage.groups.group import Group
results in
...
from sage.rings.complex_double import CDF
File "sage/rings/real_double.pxd", line 8, in init sage.rings.complex_double (/export/pkgs/linux-rh6/sagemath-7.0/src/build/cythonized/sage/rings/complex_double.c:22654)
File "sage/rings/real_double.pyx", line 64, in init sage.rings.real_double (/export/pkgs/linux-rh6/sagemath-7.0/src/build/cythonized/sage/rings/real_double.c:25060)
ImportError: cannot import name ZZ
(I can post the full traceback if that would be helpful.) Similar things happen for almost any import I try. I was using the import_statements
to determine what to import.
Am I missing something?