operating system is Ubuntu 18.04.3 LTS
O.S type is 64 bit.
steps:
1. downloaded sage-8.9-Ubuntu_18.04-x86_64.tar.bz2 package.
2. extract using
tar xvf sage-8.9-Ubuntu_18.04-x86_64.tar.bz2
3. cd Sagemath
4. ./sage
Note: Attached sage crash report that has been generated when i run ./sage.
i is working fine when i use sudo ./sage
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sage-support/0ab42fa7-d638-4b89-ae0f-810cfbc35403%40googlegroups.com.
***************************************************************************
IPython post-mortem report
{'commit_hash': u'033ab93c7',
'commit_source': 'installation',
'default_encoding': 'UTF-8',
'ipython_path':
'/home/hassan/SageMath/local/lib/python2.7/site-packages/IPython',
'ipython_version': '5.8.0',
'os_name': 'posix',
'platform': 'Linux-5.0.0-37-generic-x86_64-with-debian-buster-sid',
'sys_executable': '/home/hassan/SageMath/local/bin/python2',
'sys_platform': 'linux2',
'sys_version': '2.7.15 (default, Oct 18 2019, 17:33:39) \n[GCC 7.4.0]'}
***************************************************************************
***************************************************************************
Crash traceback:
---------------------------------------------------------------------------
---------------------------------------------------------------------------
OSError Python 2.7.15: /home/hassan/SageMath/local/bin/python2
Mon Dec 23 19:43:25 2019
A problem occurred executing Python code. Here is the sequence of function
calls leading up to the error, with the most recent (innermost) call last.
/home/hassan/SageMath/src/bin/sage-ipython in <module>()
1 #!/usr/bin/env sage-python23
2 # -*- coding: utf-8 -*-
3 """
4 Sage IPython startup script.
5 """
6
7 # Display startup banner. Do this before anything else to give the user
8 # early feedback that Sage is starting.
9 from sage.misc.banner import banner
10 banner()
11
12 from sage.repl.interpreter import SageTerminalApp
13
14 app = SageTerminalApp.instance()
---> 15 app.initialize()
global app.initialize = <bound method SageTerminalApp.initialize of
<sage.repl.interpreter.SageTerminalApp object at 0x7f2a62a3fdd0>>
16 app.start()
</home/hassan/SageMath/local/lib/python2.7/site-packages/decorator.pyc:decorator-gen-110>
in initialize(self=<sage.repl.interpreter.SageTerminalApp object>, argv=None)
/home/hassan/SageMath/local/lib/python2.7/site-packages/traitlets/config/application.pyc
in catch_config_error(method=<function initialize>,
app=<sage.repl.interpreter.SageTerminalApp object>, *args=(None,), **kwargs={})
72 TRAITLETS_APPLICATION_RAISE_CONFIG_FILE_ERROR = False
73 else:
74 raise ValueError("Unsupported value for environment variable:
'TRAITLETS_APPLICATION_RAISE_CONFIG_FILE_ERROR' is set to '%s' which is none of
{'0', '1', 'false', 'true', ''}."% _envvar )
75
76
77 @decorator
78 def catch_config_error(method, app, *args, **kwargs):
79 """Method decorator for catching invalid config
(Trait/ArgumentErrors) during init.
80
81 On a TraitError (generally caused by bad config), this will print
the trait's
82 message, and exit the app.
83
84 For use on init methods, to prevent invoking excepthook on invalid
input.
85 """
86 try:
---> 87 return method(app, *args, **kwargs)
method = <function initialize at 0x7f2a5d292758>
app = <sage.repl.interpreter.SageTerminalApp object at 0x7f2a62a3fdd0>
args = (None,)
kwargs = {}
88 except (TraitError, ArgumentError) as e:
89 app.print_help()
90 app.log.fatal("Bad config encountered during initialization:")
91 app.log.fatal(str(e))
92 app.log.debug("Config at the time: %s", app.config)
93 app.exit(1)
94
95
96 class ApplicationError(Exception):
97 pass
98
99
100 class LevelFormatter(logging.Formatter):
101 """Formatter with additional `highlevel` record
102
/home/hassan/SageMath/local/lib/python2.7/site-packages/IPython/terminal/ipapp.pyc
in initialize(self=<sage.repl.interpreter.SageTerminalApp object>, argv=None)
301
302 return super(TerminalIPythonApp, self).parse_command_line(argv)
303
304 @catch_config_error
305 def initialize(self, argv=None):
306 """Do actions after construct, but before starting the app."""
307 super(TerminalIPythonApp, self).initialize(argv)
308 if self.subapp is not None:
309 # don't bother initializing further, starting subapp
310 return
311 # print self.extra_args
312 if self.extra_args and not self.something_to_run:
313 self.file_to_run = self.extra_args[0]
314 self.init_path()
315 # create the shell
--> 316 self.init_shell()
self.init_shell = <bound method SageTerminalApp.init_shell of
<sage.repl.interpreter.SageTerminalApp object at 0x7f2a62a3fdd0>>
317 # and draw the banner
318 self.init_banner()
319 # Now a variety of things that happen after the banner is
printed.
320 self.init_gui_pylab()
321 self.init_extensions()
322 self.init_code()
323
324 def init_shell(self):
325 """initialize the InteractiveShell instance"""
326 # Create an InteractiveShell instance.
327 # shell.display_banner should always be False for the terminal
328 # based app, because we call shell.show_banner() by hand below
329 # so the banner shows *before* all extension loading stuff.
330 self.shell = self.interactive_shell_class.instance(parent=self,
331 profile_dir=self.profile_dir,
/home/hassan/SageMath/local/lib/python2.7/site-packages/sage/repl/interpreter.pyc
in init_shell(self=<sage.repl.interpreter.SageTerminalApp object>)
772 self.shell.has_sage_extensions = SAGE_EXTENSION in
self.extensions
773
774 # Load the %lprun extension if available
775 try:
776 import line_profiler
777 except ImportError:
778 pass
779 else:
780 self.extensions.append('line_profiler')
781
782 if self.shell.has_sage_extensions:
783 self.extensions.remove(SAGE_EXTENSION)
784
785 # load sage extension here to get a crash if
786 # something is wrong with the sage library
--> 787 self.shell.extension_manager.load_extension(SAGE_EXTENSION)
self.shell.extension_manager.load_extension = <bound method
ExtensionManager.load_extension of <IPython.core.extensions.ExtensionManager
object at 0x7f2a4de32750>>
global SAGE_EXTENSION = 'sage'
788
789
/home/hassan/SageMath/local/lib/python2.7/site-packages/IPython/core/extensions.pyc
in load_extension(self=<IPython.core.extensions.ExtensionManager object>,
module_str='sage')
70
71 Returns the string "already loaded" if the extension is already
loaded,
72 "no load function" if the module doesn't have a
load_ipython_extension
73 function, or None if it succeeded.
74 """
75 if module_str in self.loaded:
76 return "already loaded"
77
78 from IPython.utils.syspathcontext import prepended_to_syspath
79
80 with self.shell.builtin_trap:
81 if module_str not in sys.modules:
82 with prepended_to_syspath(self.ipython_extension_dir):
83 __import__(module_str)
84 mod = sys.modules[module_str]
---> 85 if self._call_load_ipython_extension(mod):
self._call_load_ipython_extension = <bound method
ExtensionManager._call_load_ipython_extension of
<IPython.core.extensions.ExtensionManager object at 0x7f2a4de32750>>
mod = <module 'sage' from
'/home/hassan/SageMath/local/lib/python2.7/site-packages/sage/__init__.pyc'>
86 self.loaded.add(module_str)
87 else:
88 return "no load function"
89
90 def unload_extension(self, module_str):
91 """Unload an IPython extension by its module name.
92
93 This function looks up the extension's name in ``sys.modules``
and
94 simply calls ``mod.unload_ipython_extension(self)``.
95
96 Returns the string "no unload function" if the extension
doesn't define
97 a function to unload itself, "not loaded" if the extension
isn't loaded,
98 otherwise None.
99 """
100 if module_str not in self.loaded:
/home/hassan/SageMath/local/lib/python2.7/site-packages/IPython/core/extensions.pyc
in _call_load_ipython_extension(self=<IPython.core.extensions.ExtensionManager
object>, mod=<module 'sage' from
'/home/hassan/SageMath/local/lib/python2.7/site-packages/sage/__init__.pyc'>)
117 """
118 from IPython.utils.syspathcontext import prepended_to_syspath
119
120 if (module_str in self.loaded) and (module_str in sys.modules):
121 self.unload_extension(module_str)
122 mod = sys.modules[module_str]
123 with prepended_to_syspath(self.ipython_extension_dir):
124 reload(mod)
125 if self._call_load_ipython_extension(mod):
126 self.loaded.add(module_str)
127 else:
128 self.load_extension(module_str)
129
130 def _call_load_ipython_extension(self, mod):
131 if hasattr(mod, 'load_ipython_extension'):
--> 132 mod.load_ipython_extension(self.shell)
mod.load_ipython_extension = <function load_ipython_extension at
0x7f2a65319848>
self.shell = <sage.repl.interpreter.SageTerminalInteractiveShell object
at 0x7f2a5d22e6d0>
133 return True
134
135 def _call_unload_ipython_extension(self, mod):
136 if hasattr(mod, 'unload_ipython_extension'):
137 mod.unload_ipython_extension(self.shell)
138 return True
139
140 def install_extension(self, url, filename=None):
141 """Download and install an IPython extension.
142
143 If filename is given, the file will be so named (inside the
extension
144 directory). Otherwise, the name from the URL will be used. The
file must
145 have a .py or .zip extension; otherwise, a ValueError will be
raised.
146
147 Returns the full path to the installed file.
/home/hassan/SageMath/local/lib/python2.7/site-packages/sage/__init__.pyc in
load_ipython_extension(*args=(<sage.repl.interpreter.SageTerminalInteractiveShell
object>,))
1 __all__ = ['all']
2
3 # Set sage.__version__ to the current version number. This is analogous
4 # to many other Python packages.
5 from sage.version import version as __version__
6
7 # Make sure that the correct zlib library is loaded. This is needed
8 # to prevent the system zlib to be loaded instead of the Sage one.
9 # See https://trac.sagemath.org/ticket/23122
10 import zlib
11
12 # IPython calls this when starting up
13 def load_ipython_extension(*args):
14 import sage.repl.ipython_extension
---> 15 sage.repl.ipython_extension.load_ipython_extension(*args)
sage.repl.ipython_extension.load_ipython_extension = <function
load_ipython_extension at 0x7f2a4d9b2d70>
args = (<sage.repl.interpreter.SageTerminalInteractiveShell object at
0x7f2a5d22e6d0>,)
16
17
18 # Monkey-patch inspect.isfunction() to support Cython functions.
19 def isfunction(obj):
20 """
21 Check whether something is a function.
22
23 We assume that anything which has a genuine ``__code__``
24 attribute (not using ``__getattr__`` overrides) is a function.
25 This is meant to support Cython functions.
26
27 EXAMPLES::
28
29 sage: from inspect import isfunction
30 sage: def f(): pass
31 sage: isfunction(f)
/home/hassan/SageMath/local/lib/python2.7/site-packages/sage/repl/ipython_extension.pyc
in wrapper(*args=(<sage.repl.interpreter.SageTerminalInteractiveShell
object>,), **kwargs={})
547 ....: if work:
548 ....: return 'foo worked'
549 ....: raise RuntimeError("foo didn't work")
550 sage: foo(False)
551 Traceback (most recent call last):
552 ...
553 RuntimeError: foo didn't work
554 sage: foo(True)
555 'foo worked'
556 sage: foo(False)
557 sage: foo(True)
558 """
559 @wraps(func)
560 def wrapper(*args, **kwargs):
561 if not wrapper.has_run:
--> 562 result = func(*args, **kwargs)
result = undefined
global func = undefined
args = (<sage.repl.interpreter.SageTerminalInteractiveShell object at
0x7f2a5d22e6d0>,)
kwargs = {}
563 wrapper.has_run = True
564 return result
565 wrapper.has_run = False
566 return wrapper
567
568
569 @run_once
570 def load_ipython_extension(ip):
571 """
572 Load the extension in IPython.
573 """
574 # this modifies ip
575 SageCustomizations(shell=ip)
/home/hassan/SageMath/local/lib/python2.7/site-packages/sage/repl/ipython_extension.pyc
in
load_ipython_extension(ip=<sage.repl.interpreter.SageTerminalInteractiveShell
object>)
560 def wrapper(*args, **kwargs):
561 if not wrapper.has_run:
562 result = func(*args, **kwargs)
563 wrapper.has_run = True
564 return result
565 wrapper.has_run = False
566 return wrapper
567
568
569 @run_once
570 def load_ipython_extension(ip):
571 """
572 Load the extension in IPython.
573 """
574 # this modifies ip
--> 575 SageCustomizations(shell=ip)
global SageCustomizations = <class
'sage.repl.ipython_extension.SageCustomizations'>
global shell = undefined
ip = <sage.repl.interpreter.SageTerminalInteractiveShell object at
0x7f2a5d22e6d0>
/home/hassan/SageMath/local/lib/python2.7/site-packages/sage/repl/ipython_extension.pyc
in __init__(self=<sage.repl.ipython_extension.SageCustomizations object>,
shell=<sage.repl.interpreter.SageTerminalInteractiveShell object>)
418 def __init__(self, shell=None):
419 """
420 Initialize the Sage plugin.
421 """
422 self.shell = shell
423
424 self.auto_magics = SageMagics(shell)
425 self.shell.register_magics(self.auto_magics)
426
427 import sage.misc.edit_module as edit_module
428 self.shell.set_hook('editor', edit_module.edit_devel)
429
430 self.init_inspector()
431 self.init_line_transforms()
432
--> 433 import sage.all # until sage's import hell is fixed
sage.all = undefined
434
435 self.shell.verbose_quit = True
436 self.set_quit_hook()
437
438 self.register_interface_magics()
439
440 if SAGE_IMPORTALL == 'yes':
441 self.init_environment()
442
443 def register_interface_magics(self):
444 """
445 Register magics for each of the Sage interfaces
446 """
447 from sage.repl.interface_magic import InterfaceMagic
448 InterfaceMagic.register_all(self.shell)
/home/hassan/SageMath/local/lib/python2.7/site-packages/sage/all.py in
<module>()
251 symmetrica.end()
252
253
254 from sage.misc.persist import register_unpickle_override
255 register_unpickle_override('sage.categories.category', 'Sets', Sets)
256 register_unpickle_override('sage.categories.category_types',
'HeckeModules', HeckeModules)
257 register_unpickle_override('sage.categories.category_types', 'Objects',
Objects)
258 register_unpickle_override('sage.categories.category_types', 'Rings',
Rings)
259 register_unpickle_override('sage.categories.category_types', 'Fields',
Fields)
260 register_unpickle_override('sage.categories.category_types',
'VectorSpaces', VectorSpaces)
261 register_unpickle_override('sage.categories.category_types',
'Schemes_over_base', sage.categories.schemes.Schemes_over_base)
262 register_unpickle_override('sage.categories.category_types',
'ModularAbelianVarieties', ModularAbelianVarieties)
263 register_unpickle_override('sage.libs.pari.gen_py', 'pari', pari)
264
265 # Cache the contents of star imports.
--> 266 sage.misc.lazy_import.save_cache_file()
global sage.misc.lazy_import.save_cache_file = undefined
267
268
269 ### Debugging for Singular, see trac #10903
270 # from sage.libs.singular.ring import poison_currRing
271 # sys.settrace(poison_currRing)
272
273
274 # Write a file indicating that Sage was started up successfully.
275 # This is called by the sage-starts script.
276 def _write_started_file():
277 """
278 Write a ``sage-started.txt`` file if it does not exist. The
279 contents of this file do not matter, only its existence.
280
281 The non-existence of this file will be used as a trigger to run
/home/hassan/SageMath/local/lib/python2.7/site-packages/sage/misc/lazy_import.pyx
in sage.misc.lazy_import.save_cache_file
(build/cythonized/sage/misc/lazy_import.c:7934)()
1101 TESTS::
1102
1103 sage: import sage.misc.lazy_import
1104 sage: sage.misc.lazy_import.save_cache_file()
1105 """
1106 from sage.misc.misc import sage_makedirs
1107 from sage.misc.temporary_file import atomic_write
1108
1109 global star_imports
1110 if star_imports is None:
1111 star_imports = {}
1112 cache_file = get_cache_file()
1113 cache_dir = os.path.dirname(cache_file)
1114
1115 sage_makedirs(cache_dir)
-> 1116 with atomic_write(cache_file, binary=True) as f:
global atomic_write = undefined
global cache_file = undefined
global binary = undefined
global True = undefined
global f = undefined
1117 pickle.dump(star_imports, f)
1118
1119 def get_star_imports(module_name):
1120 """
1121 Lookup the list of names in a module that would be imported with
"import \\*"
1122 either via a cache or actually importing.
1123
1124 EXAMPLES::
1125
1126 sage: from sage.misc.lazy_import import get_star_imports
1127 sage: 'get_star_imports' in
get_star_imports('sage.misc.lazy_import')
1128 True
1129 sage: 'EllipticCurve' in get_star_imports('sage.schemes.all')
1130 True
1131
/home/hassan/SageMath/local/lib/python2.7/site-packages/sage/misc/temporary_file.pyc
in __enter__(self=<sage.misc.temporary_file.atomic_write object>)
407
408 If ``self.append``, then copy the current contents of
409 ``self.target`` to the temporary file.
410
411 OUTPUT: a file returned by :func:`tempfile.NamedTemporaryFile`.
412
413 TESTS::
414
415 sage: from sage.misc.temporary_file import atomic_write
416 sage: aw = atomic_write(tmp_filename())
417 sage: with aw as f:
418 ....: os.path.dirname(aw.target) ==
os.path.dirname(f.name)
419 True
420 """
421
--> 422 fd, name = tempfile.mkstemp(dir=self.tmpdir)
fd = undefined
name = undefined
global tempfile.mkstemp = <function mkstemp at 0x7f2a5eef4d70>
global dir = undefined
self.tmpdir = '/home/hassan/.sage/cache'
423 self.tempname = os.path.abspath(name)
424
425 rmode = 'r' + ('b' if self.binary else '')
426 wmode = 'w+' + ('b' if self.binary else '')
427
428 try:
429 self.tempfile = io.open(name, wmode, **self.kwargs)
430 except Exception:
431 # Some invalid arguments were passed to io.open
432 os.unlink(name)
433 raise
434 finally:
435 os.close(fd)
436
437 os.chmod(name, self.mode)
/home/hassan/SageMath/local/lib/python2.7/tempfile.pyc in mkstemp(suffix='',
prefix='tmp', dir='/home/hassan/.sage/cache', text=False)
299 If the operating system uses permission bits to indicate whether a
300 file is executable, the file is executable by no one. The file
301 descriptor is not inherited by children of this process.
302
303 Caller is responsible for deleting the file when done with it.
304 """
305
306 if dir is None:
307 dir = gettempdir()
308
309 if text:
310 flags = _text_openflags
311 else:
312 flags = _bin_openflags
313
--> 314 return _mkstemp_inner(dir, prefix, suffix, flags)
global _mkstemp_inner = <function _mkstemp_inner at 0x7f2a5eef4c08>
dir = '/home/hassan/.sage/cache'
prefix = 'tmp'
suffix = ''
flags = 131266
315
316
317 def mkdtemp(suffix="", prefix=template, dir=None):
318 """User-callable function to create and return a unique temporary
319 directory. The return value is the pathname of the directory.
320
321 Arguments are as for mkstemp, except that the 'text' argument is
322 not accepted.
323
324 The directory is readable, writable, and searchable only by the
325 creating user.
326
327 Caller is responsible for deleting the directory when done with it.
328 """
329
/home/hassan/SageMath/local/lib/python2.7/tempfile.pyc in
_mkstemp_inner(dir='/home/hassan/.sage/cache', pre='tmp', suf='', flags=131266)
229 _name_sequence = _RandomNameSequence()
230 finally:
231 _once_lock.release()
232 return _name_sequence
233
234
235 def _mkstemp_inner(dir, pre, suf, flags):
236 """Code common to mkstemp, TemporaryFile, and NamedTemporaryFile."""
237
238 names = _get_candidate_names()
239
240 for seq in xrange(TMP_MAX):
241 name = names.next()
242 file = _os.path.join(dir, pre + name + suf)
243 try:
--> 244 fd = _os.open(file, flags, 0600)
fd = undefined
global _os.open = <built-in function open>
file = '/home/hassan/.sage/cache/tmp2YxcNo'
flags = 131266
245 _set_cloexec(fd)
246 return (fd, _os.path.abspath(file))
247 except OSError, e:
248 if e.errno == _errno.EEXIST:
249 continue # try again
250 if (_os.name == 'nt' and e.errno == _errno.EACCES and
251 _os.path.isdir(dir) and _os.access(dir, _os.W_OK)):
252 # On windows, when a directory with the chosen name
already
253 # exists, EACCES error code is returned instead of
EEXIST.
254 continue
255 raise
256
257 raise IOError, (_errno.EEXIST, "No usable temporary file name
found")
258
259
OSError: [Errno 13] Permission denied: '/home/hassan/.sage/cache/tmp2YxcNo'
***************************************************************************
History of session input:
*** Last line of input (may not be in above history):