On Sun, May 10, 2015 at 5:59 AM, David Roe <roed.m...@gmail.com> wrote:
> On a related note, I get a similar error from within Sage.  When I try to
> create a free Z-module, Sage gives me an ImportError for core.numeric
> (traceback included below).  With this thread in mind, I tried reinstalling
> ipython, but `make build` fails as well with a similar import error.

You should toss that sage install and start over...   The underlying
machine architecture has changed (Opteron --> Intell) and the OS
(Ubuntu 14.10->15.04).

>
> sage: M = FreeModule(ZZ,2)
> ---------------------------------------------------------------------------
> ImportError                               Traceback (most recent call last)
> <ipython-input-1-da4abec4f888> in <module>()
> ----> 1 M = FreeModule(ZZ,Integer(2))
>
> /projects/612668ee-534c-456b-a5e8-81078cffd9c6/sage-6.7.beta4/src/sage/structure/factory.pyx
> in sage.structure.factory.UniqueFactory.__call__
> (build/cythonized/sage/structure/factory.c:1379)()
>     364         key, kwds = self.create_key_and_extra_args(*args, **kwds)
>     365         version = self.get_version(sage_version)
> --> 366         return self.get_object(version, key, kwds)
>     367
>     368     cpdef get_object(self, version, key, extra_args):
>
> /projects/612668ee-534c-456b-a5e8-81078cffd9c6/sage-6.7.beta4/src/sage/structure/factory.pyx
> in sage.structure.factory.UniqueFactory.get_object
> (build/cythonized/sage/structure/factory.c:1753)()
>     408         except KeyError:
>     409             pass
> --> 410         obj = self.create_object(version, key, **extra_args)
>     411         self._cache[version, cache_key] = obj
>     412         try:
>
> /projects/612668ee-534c-456b-a5e8-81078cffd9c6/sage-6.7.beta4/local/lib/python2.7/site-packages/sage/modules/free_module.pyc
> in create_object(self, version, key)
>     371
>     372             elif base_ring in PrincipalIdealDomains():
> --> 373                 return FreeModule_ambient_pid(base_ring, rank,
> sparse=sparse)
>     374
>     375             elif isinstance(base_ring,
> sage.rings.number_field.order.Order) \
>
> /projects/612668ee-534c-456b-a5e8-81078cffd9c6/sage-6.7.beta4/local/lib/python2.7/site-packages/sage/modules/free_module.pyc
> in __init__(self, base_ring, rank, sparse, coordinate_ring)
>    4914         """
>    4915         FreeModule_ambient_domain.__init__(self,
> base_ring=base_ring,
> -> 4916                 rank=rank, sparse=sparse,
> coordinate_ring=coordinate_ring)
>    4917
>    4918     def _repr_(self):
>
> /projects/612668ee-534c-456b-a5e8-81078cffd9c6/sage-6.7.beta4/local/lib/python2.7/site-packages/sage/modules/free_module.pyc
> in __init__(self, base_ring, rank, sparse, coordinate_ring)
>    4723         """
>    4724         FreeModule_ambient.__init__(self, base_ring,
> -> 4725                 rank, sparse, coordinate_ring)
>    4726
>    4727     def _repr_(self):
>
> /projects/612668ee-534c-456b-a5e8-81078cffd9c6/sage-6.7.beta4/local/lib/python2.7/site-packages/sage/modules/free_module.pyc
> in __init__(self, base_ring, rank, sparse, coordinate_ring)
>    4088         """
>    4089         FreeModule_generic.__init__(self, base_ring, rank=rank,
> -> 4090                 degree=rank, sparse=sparse,
> coordinate_ring=coordinate_ring)
>    4091
>    4092     def __hash__(self):
>
> /projects/612668ee-534c-456b-a5e8-81078cffd9c6/sage-6.7.beta4/local/lib/python2.7/site-packages/sage/modules/free_module.pyc
> in __init__(self, base_ring, rank, degree, sparse, coordinate_ring,
> category)
>     724
>     725         if not hasattr(self, 'Element'):
> --> 726             self.Element = ent_class(coordinate_ring, sparse)
>     727
>     728         rank = sage.rings.integer.Integer(rank)
>
> /projects/612668ee-534c-456b-a5e8-81078cffd9c6/sage-6.7.beta4/local/lib/python2.7/site-packages/sage/modules/free_module.pyc
> in element_class(R, is_sparse)
>    6737         <type
> 'sage.modules.free_module_element.FreeModuleElement_generic_dense'>
>    6738     """
> -> 6739     import sage.modules.vector_real_double_dense
>    6740     import sage.modules.vector_complex_double_dense
>    6741
>
> /projects/612668ee-534c-456b-a5e8-81078cffd9c6/sage-6.7.beta4/src/sage/modules/vector_real_double_dense.pyx
> in init sage.modules.vector_real_double_dense
> (build/cythonized/sage/modules/vector_real_double_dense.c:6099)()
> ----> 1 r"""
>       2 Dense real double vectors using a Py backend.
>       3
>       4 EXAMPLES:
>       5     sage: v = vector(RDF,[1, pi, sqrt(2)])
>
> __init__.pxd in init sage.modules.vector_double_dense
> (build/cythonized/sage/modules/vector_double_dense.c:11673)()
>
> /projects/612668ee-534c-456b-a5e8-81078cffd9c6/sage-6.7.beta4/local/lib/python2.7/site-packages/numpy/__init__.py
> in <module>()
>     151         return loader(*packages, **options)
>     152
> --> 153     from . import add_newdocs
>     154     __all__ = ['add_newdocs', 'ModuleDeprecationWarning']
>     155
>
> /projects/612668ee-534c-456b-a5e8-81078cffd9c6/sage-6.7.beta4/local/lib/python2.7/site-packages/numpy/add_newdocs.py
> in <module>()
>      11 from __future__ import division, absolute_import, print_function
>      12
> ---> 13 from py.lib import add_newdoc
>      14
>      15
> ###############################################################################
>
> /projects/612668ee-534c-456b-a5e8-81078cffd9c6/sage-6.7.beta4/local/lib/python2.7/site-packages/numpy/lib/__init__.py
> in <module>()
>       6 from py.version import version as __version__
>       7
> ----> 8 from .type_check import *
>       9 from .index_tricks import *
>      10 from .function_base import *
>
> /projects/612668ee-534c-456b-a5e8-81078cffd9c6/sage-6.7.beta4/local/lib/python2.7/site-packages/numpy/lib/type_check.py
> in <module>()
>       9            'common_type']
>      10
> ---> 11 import py.core.numeric as _nx
>      12 from py.core.numeric import asarray, asanyarray, array, isnan, \
>      13                 obj2sctype, zeros
>
> ImportError: No module named core.numeric
>
>
> Tail of build log:
>
> if [ -z "$SAGE_INSTALL_FETCH_ONLY" ]; then \
>     cd /projects/612668ee-534c-456b-a5e8-81078cffd9c6/sage-6.7.beta4/src &&
> source bin/sage-env && \
>
> /projects/612668ee-534c-456b-a5e8-81078cffd9c6/sage-6.7.beta4/build/pipestatus
> 'time make sage 2>&1' 'tee -a
> /projects/612668ee-534c-456b-a5e8-81078cffd9c6/sage-6.7.beta4/logs/pkgs/sage-6.7.beta4.log'
> && \
>     touch
> /projects/612668ee-534c-456b-a5e8-81078cffd9c6/sage-6.7.beta4/local/var/lib/sage/installed/sage;
> \
> fi
> make[3]: Entering directory
> '/projects/612668ee-534c-456b-a5e8-81078cffd9c6/sage-6.7.beta4/src'
> python setup.py install
> Traceback (most recent call last):
>   File "setup.py", line 39, in <module>
>     import numpy
>   File
> "/projects/612668ee-534c-456b-a5e8-81078cffd9c6/sage-6.7.beta4/local/lib/python2.7/site-packages/numpy/__init__.py",
> line 153, in <module>
>     from . import add_newdocs
>   File
> "/projects/612668ee-534c-456b-a5e8-81078cffd9c6/sage-6.7.beta4/local/lib/python2.7/site-packages/numpy/add_newdocs.py",
> line 13, in <module>
>     from numpy.lib import add_newdoc
>   File
> "/projects/612668ee-534c-456b-a5e8-81078cffd9c6/sage-6.7.beta4/local/lib/python2.7/site-packages/numpy/lib/__init__.py",
> line 8, in <module>
>     from .type_check import *
>   File
> "/projects/612668ee-534c-456b-a5e8-81078cffd9c6/sage-6.7.beta4/local/lib/python2.7/site-packages/numpy/lib/type_check.py",
> line 11, in <module>
>     import numpy.core.numeric as _nx
> ImportError: No module named core.numeric
> Makefile:9: recipe for target 'sage' failed
> make[3]: *** [sage] Error 1
> make[3]: Leaving directory
> '/projects/612668ee-534c-456b-a5e8-81078cffd9c6/sage-6.7.beta4/src'
>
> real    0m0.440s
> user    0m0.332s
> sys    0m0.084s
> Makefile:923: recipe for target
> '/projects/612668ee-534c-456b-a5e8-81078cffd9c6/sage-6.7.beta4/local/var/lib/sage/installed/sage'
> failed
> make[2]: ***
> [/projects/612668ee-534c-456b-a5e8-81078cffd9c6/sage-6.7.beta4/local/var/lib/sage/installed/sage]
> Error 2
> make[2]: Leaving directory
> '/projects/612668ee-534c-456b-a5e8-81078cffd9c6/sage-6.7.beta4/build'
> Makefile:418: recipe for target 'all' failed
> make[1]: *** [all] Error 2
> make[1]: Leaving directory
> '/projects/612668ee-534c-456b-a5e8-81078cffd9c6/sage-6.7.beta4/build'
>
> real    1m53.777s
> user    1m38.932s
> sys    0m7.572s
> ***************************************************************
> Error building Sage.
>
> The following package(s) may have failed to build:
>
> The build directory may contain configuration files and other potentially
> helpful information. WARNING: if you now run 'make' again, the build
> directory will, by default, be deleted. Set the environment variable
> SAGE_KEEP_BUILT_SPKGS to 'yes' to prevent this.
>
> Makefile:19: recipe for target 'build' failed
> make: *** [build] Error 1
>
> On Fri, May 8, 2015 at 6:54 PM, Volker Braun <vbraun.n...@gmail.com> wrote:
>>
>> I've never seen that.
>>
>> Just to point out the obvious, you don't have a coredump "core" file lying
>> around in cwd or the ipython tree? That might mess up the "from core
>> import"..
>>
>>
>>
>> On Friday, May 8, 2015 at 11:48:36 PM UTC+2, William wrote:
>>>
>>> Hi,
>>>
>>> Why is this happening?
>>>
>>> 1. I build sage.
>>>
>>> 2. I make a binary.
>>>
>>> 3. I extract the binary on an identical machine and start it and get
>>> "ImportError: No module named core.getipython".
>>>
>>> 4. Doing ./sage -f ipython fixes the problem.
>>>
>>> I've seen this issue in all kinds of places lately.  What is ipython
>>> messing up?
>>>
>>> ~$ cd sage-6.7.beta4/
>>> ~/sage-6.7.beta4$ ./sage
>>> ┌────────────────────────────────────────────────────────────────────┐
>>> │ SageMath Version 6.7.beta4, Release Date: 2015-05-05               │
>>> │ Type "notebook()" for the browser-based notebook interface.        │
>>> │ Type "help()" for help.                                            │
>>> └────────────────────────────────────────────────────────────────────┘
>>> ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
>>> ┃ Warning: this is a prerelease version, and it may be unstable.     ┃
>>> ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
>>> Traceback (most recent call last):
>>>   File
>>> "/projects/612668ee-534c-456b-a5e8-81078cffd9c6/sage-6.7.beta4/src/bin/sage-ipython",
>>> line 7, in <module>
>>>     from sage.repl.interpreter import SageTerminalApp
>>>   File
>>> "/projects/612668ee-534c-456b-a5e8-81078cffd9c6/sage-6.7.beta4/local/lib/python2.7/site-packages/sage/__init__.py",
>>> line 3, in <mod
>>> ule>
>>>     from sage.repl.ipython_extension import load_ipython_extension
>>>   File
>>> "/projects/612668ee-534c-456b-a5e8-81078cffd9c6/sage-6.7.beta4/local/lib/python2.7/site-packages/sage/repl/ipython_extension.py",
>>> l
>>> ine 59, in <module>
>>>     from IPython.core.magic import Magics, magics_class, line_magic
>>>   File
>>> "/projects/612668ee-534c-456b-a5e8-81078cffd9c6/sage-6.7.beta4/local/lib/python2.7/site-packages/IPython/__init__.py",
>>> line 46, in
>>> <module>
>>>     from .core.getipython import get_ipython
>>> ImportError: No module named core.getipython
>>> ~/sage-6.7.beta4$ ./sage -f ipython
>>
>> --
>> 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.
>
>
> --
> 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.



-- 
William (http://wstein.org)

-- 
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.

Reply via email to