*************************************************************************** IPython post-mortem report {'commit_hash': '', 'commit_source': '(none found)', 'default_encoding': 'utf-8', 'ipython_path': '/usr/lib/python3.9/site-packages/IPython', 'ipython_version': '7.19.0', 'os_name': 'posix', 'platform': 'Linux-5.10.11-arch1-1-x86_64-with-glibc2.32', 'sys_executable': '/usr/bin/python', 'sys_platform': 'linux', 'sys_version': '3.9.1 (default, Dec 13 2020, 11:55:53) \n[GCC 10.2.0]'} *************************************************************************** *************************************************************************** Crash traceback: --------------------------------------------------------------------------- --------------------------------------------------------------------------- ImportError Python 3.9.1: /usr/bin/python Mon Feb 1 14:00:06 2021 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. /usr/bin/sage-ipython in 1 #!/usr/bin/python 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 = > 16 app.start() /usr/lib/python3.9/site-packages/traitlets/config/application.py in inner(app=, *args=(), **kwargs={}) 72 else: 73 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 ) 74 75 76 def catch_config_error(method): 77 """Method decorator for catching invalid config (Trait/ArgumentErrors) during init. 78 79 On a TraitError (generally caused by bad config), this will print the trait's 80 message, and exit the app. 81 82 For use on init methods, to prevent invoking excepthook on invalid input. 83 """ 84 @functools.wraps(method) 85 def inner(app, *args, **kwargs): 86 try: ---> 87 return method(app, *args, **kwargs) global method = undefined app = args = () kwargs = {} 88 except (TraitError, ArgumentError) as e: 89 app.log.fatal("Bad config encountered during initialization: %s", e) 90 app.log.debug("Config at the time: %s", app.config) 91 app.exit(1) 92 93 return inner 94 95 class ApplicationError(Exception): 96 pass 97 98 99 class LevelFormatter(logging.Formatter): 100 """Formatter with additional `highlevel` record 101 102 This field is empty if log level is less than highlevel_limit, /usr/lib/python3.9/site-packages/IPython/terminal/ipapp.py in initialize(self=, argv=None) 302 303 return super(TerminalIPythonApp, self).parse_command_line(argv) 304 305 @catch_config_error 306 def initialize(self, argv=None): 307 """Do actions after construct, but before starting the app.""" 308 super(TerminalIPythonApp, self).initialize(argv) 309 if self.subapp is not None: 310 # don't bother initializing further, starting subapp 311 return 312 # print self.extra_args 313 if self.extra_args and not self.something_to_run: 314 self.file_to_run = self.extra_args[0] 315 self.init_path() 316 # create the shell --> 317 self.init_shell() self.init_shell = > 318 # and draw the banner 319 self.init_banner() 320 # Now a variety of things that happen after the banner is printed. 321 self.init_gui_pylab() 322 self.init_extensions() 323 self.init_code() 324 325 def init_shell(self): 326 """initialize the InteractiveShell instance""" 327 # Create an InteractiveShell instance. 328 # shell.display_banner should always be False for the terminal 329 # based app, because we call shell.show_banner() by hand below 330 # so the banner shows *before* all extension loading stuff. 331 self.shell = self.interactive_shell_class.instance(parent=self, 332 profile_dir=self.profile_dir, /usr/lib/python3.9/site-packages/sage/repl/interpreter.py in init_shell(self=) 776 self.shell.has_sage_extensions = SAGE_EXTENSION in self.extensions 777 778 # Load the %lprun extension if available 779 try: 780 import line_profiler 781 except ImportError: 782 pass 783 else: 784 self.extensions.append('line_profiler') 785 786 if self.shell.has_sage_extensions: 787 self.extensions.remove(SAGE_EXTENSION) 788 789 # load sage extension here to get a crash if 790 # something is wrong with the sage library --> 791 self.shell.extension_manager.load_extension(SAGE_EXTENSION) self.shell.extension_manager.load_extension = > global SAGE_EXTENSION = 'sage' 792 793 /usr/lib/python3.9/site-packages/IPython/core/extensions.py in load_extension(self=, module_str='sage') 72 if module_str in self.loaded: 73 return "already loaded" 74 75 from IPython.utils.syspathcontext import prepended_to_syspath 76 77 with self.shell.builtin_trap: 78 if module_str not in sys.modules: 79 with prepended_to_syspath(self.ipython_extension_dir): 80 mod = import_module(module_str) 81 if mod.__file__.startswith(self.ipython_extension_dir): 82 print(("Loading extensions from {dir} is deprecated. " 83 "We recommend managing extensions like any " 84 "other Python packages, in site-packages.").format( 85 dir=compress_user(self.ipython_extension_dir))) 86 mod = sys.modules[module_str] ---> 87 if self._call_load_ipython_extension(mod): self._call_load_ipython_extension = > mod = 88 self.loaded.add(module_str) 89 else: 90 return "no load function" 91 92 def unload_extension(self, module_str): 93 """Unload an IPython extension by its module name. 94 95 This function looks up the extension's name in ``sys.modules`` and 96 simply calls ``mod.unload_ipython_extension(self)``. 97 98 Returns the string "no unload function" if the extension doesn't define 99 a function to unload itself, "not loaded" if the extension isn't loaded, 100 otherwise None. 101 """ 102 if module_str not in self.loaded: /usr/lib/python3.9/site-packages/IPython/core/extensions.py in _call_load_ipython_extension(self=, mod=) 119 """ 120 from IPython.utils.syspathcontext import prepended_to_syspath 121 122 if (module_str in self.loaded) and (module_str in sys.modules): 123 self.unload_extension(module_str) 124 mod = sys.modules[module_str] 125 with prepended_to_syspath(self.ipython_extension_dir): 126 reload(mod) 127 if self._call_load_ipython_extension(mod): 128 self.loaded.add(module_str) 129 else: 130 self.load_extension(module_str) 131 132 def _call_load_ipython_extension(self, mod): 133 if hasattr(mod, 'load_ipython_extension'): --> 134 mod.load_ipython_extension(self.shell) mod.load_ipython_extension = self.shell = 135 return True 136 137 def _call_unload_ipython_extension(self, mod): 138 if hasattr(mod, 'unload_ipython_extension'): 139 mod.unload_ipython_extension(self.shell) 140 return True 141 142 @undoc 143 def install_extension(self, url, filename=None): 144 """ 145 Deprecated. 146 """ 147 # Ensure the extension directory exists 148 raise DeprecationWarning( 149 '`install_extension` and the `install_ext` magic have been deprecated since IPython 4.0' /usr/lib/python3.9/site-packages/sage/__init__.py in load_ipython_extension(*args=(,)) 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 import sys 8 # Make sure that the correct zlib library is loaded. This is needed 9 # to prevent the system zlib to be loaded instead of the Sage one. 10 # See https://trac.sagemath.org/ticket/23122 11 import zlib 12 13 # IPython calls this when starting up 14 def load_ipython_extension(*args): 15 import sage.repl.ipython_extension ---> 16 sage.repl.ipython_extension.load_ipython_extension(*args) sage.repl.ipython_extension.load_ipython_extension = args = (,) 17 18 19 # Monkey-patch inspect.isfunction() to support Cython functions. 20 def isfunction(obj): 21 """ 22 Check whether something is a function. 23 24 We assume that anything which has a genuine ``__code__`` 25 attribute (not using ``__getattr__`` overrides) is a function. 26 This is meant to support Cython functions. 27 28 EXAMPLES:: 29 30 sage: from inspect import isfunction 31 sage: def f(): pass /usr/lib/python3.9/site-packages/sage/repl/ipython_extension.py in wrapper(*args=(,), **kwargs={}) 548 ....: if work: 549 ....: return 'foo worked' 550 ....: raise RuntimeError("foo didn't work") 551 sage: foo(False) 552 Traceback (most recent call last): 553 ... 554 RuntimeError: foo didn't work 555 sage: foo(True) 556 'foo worked' 557 sage: foo(False) 558 sage: foo(True) 559 """ 560 @wraps(func) 561 def wrapper(*args, **kwargs): 562 if not wrapper.has_run: --> 563 result = func(*args, **kwargs) result = undefined global func = undefined args = (,) kwargs = {} 564 wrapper.has_run = True 565 return result 566 wrapper.has_run = False 567 return wrapper 568 569 570 @run_once 571 def load_ipython_extension(ip): 572 """ 573 Load the extension in IPython. 574 """ 575 # this modifies ip 576 SageCustomizations(shell=ip) /usr/lib/python3.9/site-packages/sage/repl/ipython_extension.py in load_ipython_extension(ip=) 561 def wrapper(*args, **kwargs): 562 if not wrapper.has_run: 563 result = func(*args, **kwargs) 564 wrapper.has_run = True 565 return result 566 wrapper.has_run = False 567 return wrapper 568 569 570 @run_once 571 def load_ipython_extension(ip): 572 """ 573 Load the extension in IPython. 574 """ 575 # this modifies ip --> 576 SageCustomizations(shell=ip) global SageCustomizations = global shell = undefined ip = /usr/lib/python3.9/site-packages/sage/repl/ipython_extension.py in __init__(self=, shell=) 420 def __init__(self, shell=None): 421 """ 422 Initialize the Sage plugin. 423 """ 424 self.shell = shell 425 426 self.auto_magics = SageMagics(shell) 427 self.shell.register_magics(self.auto_magics) 428 429 import sage.misc.edit_module as edit_module 430 self.shell.set_hook('editor', edit_module.edit_devel) 431 432 self.init_inspector() 433 self.init_line_transforms() 434 --> 435 import sage.all # until sage's import hell is fixed sage.all = undefined 436 437 self.shell.verbose_quit = True 438 self.set_quit_hook() 439 440 self.register_interface_magics() 441 442 if SAGE_IMPORTALL == 'yes': 443 self.init_environment() 444 445 def register_interface_magics(self): 446 """ 447 Register magics for each of the Sage interfaces 448 """ 449 from sage.repl.interface_magic import InterfaceMagic 450 InterfaceMagic.register_all(self.shell) /usr/lib/python3.9/site-packages/sage/all.py in 156 from sage.interfaces.all import * 157 158 from sage.functions.all import * 159 from sage.calculus.all import * 160 161 lazy_import('sage.tests', 'all', as_='tests', deprecation=27337) 162 from sage.cpython.all import * 163 164 from sage.crypto.all import * 165 import sage.crypto.mq as mq 166 167 from sage.plot.all import * 168 from sage.plot.plot3d.all import * 169 170 from sage.coding.all import * --> 171 from sage.combinat.all import * global sage.combinat.all = undefined 172 173 from sage.lfunctions.all import * 174 175 from sage.geometry.all import * 176 from sage.geometry.triangulation.all import * 177 from sage.geometry.riemannian_manifolds.all import * 178 179 from sage.dynamics.all import * 180 181 from sage.homology.all import * 182 183 from sage.quadratic_forms.all import * 184 185 from sage.games.all import * 186 /usr/lib/python3.9/site-packages/sage/combinat/all.py in 156 lazy_import('sage.combinat.multiset_partition_into_sets_ordered', ['OrderedMultisetPartitionIntoSets', 157 'OrderedMultisetPartitionsIntoSets']) 158 from .subset import Subsets 159 #from subsets_pairwise import PairwiseCompatibleSubsets 160 from .necklace import Necklaces 161 lazy_import('sage.combinat.dyck_word', ('DyckWords', 'DyckWord')) 162 from .sloane_functions import sloane 163 lazy_import('sage.combinat.superpartition', ('SuperPartition', 164 'SuperPartitions')) 165 166 lazy_import('sage.combinat.parallelogram_polyomino', 167 ['ParallelogramPolyomino', 'ParallelogramPolyominoes']) 168 169 from .root_system.all import * 170 from .sf.all import * --> 171 from .ncsf_qsym.all import * global ncsf_qsym.all = undefined 172 from .ncsym.all import * 173 lazy_import('sage.combinat.fqsym', 'FreeQuasisymmetricFunctions') 174 from .matrices.all import * 175 # Posets 176 from .posets.all import * 177 178 # Cluster Algebras and Quivers 179 from .cluster_algebra_quiver.all import * 180 181 from . import ranker 182 183 from .integer_vector import IntegerVectors 184 from .integer_vector_weighted import WeightedIntegerVectors 185 from .integer_vectors_mod_permgroup import IntegerVectorsModPermutationGroup 186 /usr/lib/python3.9/site-packages/sage/combinat/ncsf_qsym/all.py in 1 r""" 2 Features that are imported by default in the interpreter namespace 3 """ 4 from __future__ import absolute_import 5 ----> 6 from .qsym import QuasiSymmetricFunctions global qsym = undefined global QuasiSymmetricFunctions = undefined 7 from .ncsf import NonCommutativeSymmetricFunctions /usr/lib/python3.9/site-packages/sage/combinat/ncsf_qsym/qsym.py in 82 # https://www.gnu.org/licenses/ 83 # **************************************************************************** 84 from sage.misc.bindable_class import BindableClass 85 from sage.categories.graded_hopf_algebras import GradedHopfAlgebras 86 from sage.categories.rings import Rings 87 from sage.categories.fields import Fields 88 from sage.categories.realizations import Category_realization_of_parent 89 from sage.structure.parent import Parent 90 from sage.structure.unique_representation import UniqueRepresentation 91 from sage.matrix.constructor import matrix 92 from sage.matrix.matrix_space import MatrixSpace 93 from sage.combinat.permutation import Permutations 94 from sage.combinat.composition import Composition, Compositions 95 from sage.combinat.partition import Partitions, _Partitions 96 from sage.combinat.free_module import CombinatorialFreeModule ---> 97 from sage.combinat.sf.sf import SymmetricFunctions global sage.combinat.sf.sf = undefined global SymmetricFunctions = undefined 98 from sage.combinat.ncsf_qsym.generic_basis_code import BasesOfQSymOrNCSF 99 from sage.combinat.ncsf_qsym.combinatorics import (number_of_fCT, number_of_SSRCT, 100 compositions_order, coeff_pi, coeff_lp, coeff_sp, coeff_ell) 101 from sage.combinat.ncsf_qsym.ncsf import NonCommutativeSymmetricFunctions 102 from sage.combinat.words.word import Word 103 from sage.combinat.tableau import StandardTableaux 104 from sage.misc.cachefunc import cached_method 105 106 107 class QuasiSymmetricFunctions(UniqueRepresentation, Parent): 108 r""" 109 .. rubric:: The Hopf algebra of quasisymmetric functions. 110 111 Let `R` be a commutative ring with unity. 112 The `R`-algebra of quasi-symmetric functions may be realized as an /usr/lib/python3.9/site-packages/sage/combinat/sf/sf.py in 17 # General Public License for more details. 18 # 19 # The full text of the GPL is available at: 20 # 21 # http://www.gnu.org/licenses/ 22 #***************************************************************************** 23 from sage.structure.parent import Parent 24 from sage.structure.unique_representation import UniqueRepresentation 25 from sage.categories.graded_hopf_algebras import GradedHopfAlgebras 26 from sage.categories.fields import Fields 27 from sage.categories.rings import Rings 28 from sage.combinat.partition import Partitions 29 from sage.combinat.free_module import CombinatorialFreeModule 30 from sage.rings.rational_field import QQ 31 ---> 32 from . import schur global schur = undefined 33 from . import monomial 34 from . import powersum 35 from . import elementary 36 from . import homogeneous 37 from . import hall_littlewood 38 from . import jack 39 from . import macdonald 40 from . import llt 41 42 class SymmetricFunctions(UniqueRepresentation, Parent): 43 r""" 44 The abstract algebra of commutative symmetric functions 45 46 .. rubric:: Symmetric Functions in Sage 47 /usr/lib/python3.9/site-packages/sage/combinat/sf/schur.py in 7 # 8 # Distributed under the terms of the GNU General Public License (GPL) 9 # 10 # This code is distributed in the hope that it will be useful, 11 # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 # General Public License for more details. 14 # 15 # The full text of the GPL is available at: 16 # 17 # https://www.gnu.org/licenses/ 18 # **************************************************************************** 19 from __future__ import absolute_import 20 21 from . import classical ---> 22 import sage.libs.lrcalc.lrcalc as lrcalc global sage.libs.lrcalc.lrcalc = undefined global lrcalc = undefined 23 from sage.misc.all import prod 24 from sage.rings.infinity import infinity 25 from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing 26 from sage.functions.other import factorial 27 from sage.combinat.tableau import StandardTableaux 28 29 class SymmetricFunctionAlgebra_schur(classical.SymmetricFunctionAlgebra_classical): 30 def __init__(self, Sym): 31 """ 32 A class for methods related to the Schur symmetric function basis 33 34 INPUT: 35 36 - ``self`` -- a Schur symmetric function basis 37 - ``Sym`` -- an instance of the ring of the symmetric functions ImportError: /usr/lib/python3.9/site-packages/sage/libs/lrcalc/lrcalc.cpython-39-x86_64-linux-gnu.so: undefined symbol: st_new *************************************************************************** History of session input: *** Last line of input (may not be in above history):