#13083: Import fails in sage-python
------------------------+---------------------------------------------------
Reporter: poeschko | Owner: GeorgSWeber
Type: defect | Status: new
Priority: major | Milestone:
Component: build | Keywords:
Work issues: | Report Upstream: N/A
Reviewers: | Authors:
Merged in: | Dependencies:
Stopgaps: |
------------------------+---------------------------------------------------
When I run `sage -python` and then try to import something "specific"
(e.g. from the `rings` module), I get the following:
{{{
$ sage -python
Python 2.7.2 (default, May 16 2012, 20:18:27)
[GCC 4.6.3] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from sage.rings.all import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Applications/sage/local/lib/python2.7/site-
packages/sage/rings/all.py", line 42, in <module>
from ideal import Ideal, is_Ideal
File "/Applications/sage/local/lib/python2.7/site-
packages/sage/rings/ideal.py", line 35, in <module>
from sage.interfaces.singular import singular as singular_default
File "/Applications/sage/local/lib/python2.7/site-
packages/sage/interfaces/singular.py", line 340, in <module>
import sage.rings.integer
File "integer.pyx", line 170, in init sage.rings.integer
(sage/rings/integer.c:35815)
File "/Applications/sage/local/lib/python2.7/site-
packages/sage/rings/infinity.py", line 200, in <module>
import sage.rings.rational
File "fast_arith.pxd", line 5, in init sage.rings.rational
(sage/rings/rational.c:25959)
File "fast_arith.pyx", line 51, in init sage.rings.fast_arith
(sage/rings/fast_arith.c:7723)
File "integer_ring.pyx", line 69, in init sage.rings.integer_ring
(sage/rings/integer_ring.c:11304)
File "/Applications/sage/local/lib/python2.7/site-
packages/sage/structure/factorization.py", line 188, in <module>
from sage.misc.all import prod
File "/Applications/sage/local/lib/python2.7/site-
packages/sage/misc/all.py", line 81, in <module>
from functional import (additive_order,
File "/Applications/sage/local/lib/python2.7/site-
packages/sage/misc/functional.py", line 36, in <module>
from sage.rings.complex_double import CDF
File "complex_double.pyx", line 88, in init sage.rings.complex_double
(sage/rings/complex_double.c:15160)
File "real_mpfr.pxd", line 15, in init sage.rings.complex_number
(sage/rings/complex_number.c:16587)
File "real_mpfr.pyx", line 1, in init sage.rings.real_mpfr
(sage/rings/real_mpfr.c:30314)
File "utils.pyx", line 11, in init sage.libs.mpmath.utils
(sage/libs/mpmath/utils.c:6099)
File "/Applications/sage/local/lib/python2.7/site-packages/sage/all.py",
line 72, in <module>
from sage.libs.all import *
File "/Applications/sage/local/lib/python2.7/site-
packages/sage/libs/all.py", line 1, in <module>
import sage.libs.ntl.all as ntl
File "/Applications/sage/local/lib/python2.7/site-
packages/sage/libs/ntl/__init__.py", line 1, in <module>
import all
File "/Applications/sage/local/lib/python2.7/site-
packages/sage/libs/ntl/all.py", line 26, in <module>
from sage.libs.ntl.ntl_ZZ import (
File "ntl_ZZ.pyx", line 28, in init sage.libs.ntl.ntl_ZZ
(sage/libs/ntl/ntl_ZZ.cpp:6393)
File "integer_ring.pyx", line 1062, in
sage.rings.integer_ring.IntegerRing (sage/rings/integer_ring.c:9840)
NameError: ZZ
}}}
This also happens for other modules, e.g. `from sage.modules.all import
*`. However, it does not occur when I do
{{{
from sage.all import *
}}}
first. Likewise, the import works in ordinary `sage`:
{{{
$ sage
----------------------------------------------------------------------
| Sage Version 5.0, Release Date: 2012-05-14 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
sage: from sage.rings.integer_ring import *
sage:
}}}
Issuing `sage -sh` before `sage -python` does not help though.
I'm running Sage 5.0 on Mac OS X 10.5.8.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13083>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.