Thank you for your advice, I tried to reinstall python3 from Homebrew, but it still doesn't work. After I reinstall/upgrade python 3 and gsl from Homebrew, my working directory sage 9.6 crashed. My laptop is MacBook Pro with M1 chip with MacOS Big Sur version11.4. Thanks for any suggestion and help!
Sincerely, Yueqi On Sunday, July 17, 2022 at 5:57:55 AM UTC-4 dim...@gmail.com wrote: > I recommend that you do as recommended in the > output of ./configure, and install python3 from Homebrew > > On Sun, 17 Jul 2022, 08:59 Yueqi Li, <nicole...@gmail.com> wrote: > >> Dear Prof. Koeppe, >> >> Thank you so much for your help! After I run "brew install gsl," I was >> not able to run any doctes. Then I try to run ./configure and make to fix >> it. But it dosen't work, and I had error while I make it. I attached the >> configure information, make error and doctest error with this massage. >> >> Thank you for any help you may have! >> >> Sincerely, >> Yueqi >> >> -- >> 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+...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/sage-devel/c407887f-201a-43d5-908b-44af013781c6n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/sage-devel/c407887f-201a-43d5-908b-44af013781c6n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/5479a3d0-55e0-442c-9e0a-6f1b0808697dn%40googlegroups.com.
*************************************************************************** IPython post-mortem report {'commit_hash': 'bf6aeb906d', 'commit_source': 'installation', 'default_encoding': 'utf-8', 'ipython_path': '/Users/yueqili/sage-9.5/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/IPython', 'ipython_version': '7.29.0', 'os_name': 'posix', 'platform': 'macOS-11.4-arm64-arm-64bit', 'sys_executable': '/Users/yueqili/sage-9.5/local/var/lib/sage/venv-python3.10.3/bin/python3', 'sys_platform': 'darwin', 'sys_version': '3.10.3 (main, Jun 29 2022, 02:14:46) [Clang 13.0.0 ' '(clang-1300.0.29.30)]'} *************************************************************************** *************************************************************************** Crash traceback: --------------------------------------------------------------------------- --------------------------------------------------------------------------- ImportErrorPython 3.10.3: /Users/yueqili/sage-9.5/local/var/lib/sage/venv-python3.10.3/bin/python3 Mon Jul 18 01:30:42 2022 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. ~/sage-9.5/src/bin/sage-ipython in <module> 1 #!/usr/bin/env sage-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 = <bound method TerminalIPythonApp.initialize of <sage.repl.interpreter.SageTerminalApp object at 0x104747130>> 16 app.start() ~/sage-9.5/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/traitlets/config/application.py in inner(app=<sage.repl.interpreter.SageTerminalApp object>, *args=(), **kwargs={}) 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 def catch_config_error(method): 78 """Method decorator for catching invalid config (Trait/ArgumentErrors) during init. 79 80 On a TraitError (generally caused by bad config), this will print the trait's 81 message, and exit the app. 82 83 For use on init methods, to prevent invoking excepthook on invalid input. 84 """ 85 @functools.wraps(method) 86 def inner(app, *args, **kwargs): 87 try: ---> 88 return method(app, *args, **kwargs) global method = undefined app = <sage.repl.interpreter.SageTerminalApp object at 0x104747130> args = () kwargs = {} 89 except (TraitError, ArgumentError) as e: 90 app.log.fatal("Bad config encountered during initialization: %s", e) 91 app.log.debug("Config at the time: %s", app.config) 92 app.exit(1) 93 94 return inner 95 96 class ApplicationError(Exception): 97 pass 98 99 100 class LevelFormatter(logging.Formatter): 101 """Formatter with additional `highlevel` record 102 103 This field is empty if log level is less than highlevel_limit, ~/sage-9.5/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/IPython/terminal/ipapp.py in initialize(self=<sage.repl.interpreter.SageTerminalApp object>, 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 = <bound method SageTerminalApp.init_shell of <sage.repl.interpreter.SageTerminalApp object at 0x104747130>> 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, ~/sage-9.5/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/repl/interpreter.py in init_shell(self=<sage.repl.interpreter.SageTerminalApp object>) 772 773 # Load the %lprun extension if available 774 try: 775 import line_profiler 776 assert line_profiler # silence pyflakes 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 0x107e276d0>> global SAGE_EXTENSION = 'sage' ~/sage-9.5/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/IPython/core/extensions.py in load_extension(self=<IPython.core.extensions.ExtensionManager object>, 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 = <bound method ExtensionManager._call_load_ipython_extension of <IPython.core.extensions.ExtensionManager object at 0x107e276d0>> mod = <module 'sage' from '/Users/yueqili/sage-9.5/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/__init__.py'> 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: ~/sage-9.5/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/IPython/core/extensions.py in _call_load_ipython_extension(self=<IPython.core.extensions.ExtensionManager object>, mod=<module 'sage' from '/Users/yueqili/sage-9.5/loc...3/lib/python3.10/site-packages/sage/__init__.py'>) 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 = <function load_ipython_extension at 0x104947eb0> self.shell = <sage.repl.interpreter.SageTerminalInteractiveShell object at 0x1063c21d0> 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' ~/sage-9.5/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/repl/__init__.py in load_ipython_extension(*args=(<sage.repl.interpreter.SageTerminalInteractiveShell object>,)) 1 # IPython calls this when "%load_ext sage.repl" is used. 2 # The Sage application loads it when starting up. 3 def load_ipython_extension(*args): 4 import sage.repl.ipython_extension ----> 5 sage.repl.ipython_extension.load_ipython_extension(*args) sage.repl.ipython_extension.load_ipython_extension = <function load_ipython_extension at 0x1080364d0> args = (<sage.repl.interpreter.SageTerminalInteractiveShell object at 0x1063c21d0>,) 6 7 8 # The above used to be in sage.__init__, allowing users to use "%load_ext sage". 9 # But we are clearing out the __init__.py file as a preparation for 10 # making sage a native namespace package. 11 # 12 # So we make "%load_ext sage" work by monkey-patching the function 13 # into the sage package upon importing sage.repl. 14 import sage 15 sage.load_ipython_extension = load_ipython_extension ~/sage-9.5/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/repl/ipython_extension.py in wrapper(*args=(<sage.repl.interpreter.SageTerminalInteractiveShell object>,), **kwargs={}) 591 ....: if work: 592 ....: return 'foo worked' 593 ....: raise RuntimeError("foo didn't work") 594 sage: foo(False) 595 Traceback (most recent call last): 596 ... 597 RuntimeError: foo didn't work 598 sage: foo(True) 599 'foo worked' 600 sage: foo(False) 601 sage: foo(True) 602 """ 603 @wraps(func) 604 def wrapper(*args, **kwargs): 605 if not wrapper.has_run: --> 606 result = func(*args, **kwargs) result = undefined global func = undefined args = (<sage.repl.interpreter.SageTerminalInteractiveShell object at 0x1063c21d0>,) kwargs = {} 607 wrapper.has_run = True 608 return result 609 wrapper.has_run = False 610 return wrapper 611 612 613 @run_once 614 def load_ipython_extension(ip): 615 """ 616 Load the extension in IPython. 617 """ 618 # this modifies ip 619 SageCustomizations(shell=ip) ~/sage-9.5/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/repl/ipython_extension.py in load_ipython_extension(ip=<sage.repl.interpreter.SageTerminalInteractiveShell object>) 604 def wrapper(*args, **kwargs): 605 if not wrapper.has_run: 606 result = func(*args, **kwargs) 607 wrapper.has_run = True 608 return result 609 wrapper.has_run = False 610 return wrapper 611 612 613 @run_once 614 def load_ipython_extension(ip): 615 """ 616 Load the extension in IPython. 617 """ 618 # this modifies ip --> 619 SageCustomizations(shell=ip) global SageCustomizations = <class 'sage.repl.ipython_extension.SageCustomizations'> global shell = undefined ip = <sage.repl.interpreter.SageTerminalInteractiveShell object at 0x1063c21d0> ~/sage-9.5/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/repl/ipython_extension.py in __init__(self=<sage.repl.ipython_extension.SageCustomizations object>, shell=<sage.repl.interpreter.SageTerminalInteractiveShell object>) 419 def __init__(self, shell=None): 420 """ 421 Initialize the Sage plugin. 422 """ 423 self.shell = shell 424 425 self.auto_magics = SageMagics(shell) 426 self.shell.register_magics(self.auto_magics) 427 428 import sage.misc.edit_module as edit_module 429 self.shell.set_hook('editor', edit_module.edit_devel) 430 431 self.init_inspector() 432 self.init_line_transforms() 433 --> 434 import sage.all # until sage's import hell is fixed sage.all = undefined 435 436 self.shell.verbose_quit = True 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) 449 ~/sage-9.5/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/all.py in <module> 123 124 from sage.misc.sh import sh 125 126 from sage.libs.all import * 127 from sage.data_structures.all import * 128 from sage.doctest.all import * 129 130 from sage.structure.all import * 131 from sage.rings.all import * 132 from sage.arith.all import * 133 from sage.matrix.all import * 134 135 from sage.symbolic.all import * 136 from sage.modules.all import * 137 from sage.monoids.all import * --> 138 from sage.algebras.all import * global sage.algebras.all = undefined 139 from sage.modular.all import * 140 from sage.sat.all import * 141 from sage.schemes.all import * 142 from sage.graphs.all import * 143 from sage.groups.all import * 144 from sage.arith.power import generic_power as power 145 from sage.databases.all import * 146 from sage.categories.all import * 147 from sage.sets.all import * 148 from sage.probability.all import * 149 from sage.interfaces.all import * 150 151 from sage.functions.all import * 152 from sage.calculus.all import * 153 ~/sage-9.5/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/algebras/all.py in <module> 6 # Copyright (C) 2005 William Stein <wst...@gmail.com> 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 # http://www.gnu.org/licenses/ 18 #***************************************************************************** 19 from sage.misc.lazy_import import lazy_import 20 ---> 21 import sage.algebras.catalog as algebras global sage.algebras.catalog = undefined global algebras = undefined 22 23 from .quantum_groups.all import * 24 from .quatalg.all import * 25 26 # Algebra base classes 27 from .algebra import Algebra 28 from .free_algebra import FreeAlgebra 29 from .free_algebra_quotient import FreeAlgebraQuotient 30 31 from .steenrod.all import * 32 from .lie_algebras.all import * 33 from .quantum_groups.all import * 34 from .lie_conformal_algebras.all import * 35 36 from .finite_dimensional_algebras.all import FiniteDimensionalAlgebra ~/sage-9.5/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/algebras/catalog.py in <module> 69 - :class:`algebras.Steenrod 70 <sage.algebras.steenrod.steenrod_algebra.SteenrodAlgebra>` 71 - :class:`algebras.TemperleyLieb <sage.combinat.diagram_algebras.TemperleyLiebAlgebra>` 72 - :class:`algebras.WQSym <sage.combinat.chas.wqsym.WordQuasiSymmetricFunctions>` 73 - :class:`algebras.Yangian <sage.algebras.yangian.Yangian>` 74 - :class:`algebras.YokonumaHecke 75 <sage.algebras.yokonuma_hecke_algebra.YokonumaHeckeAlgebra>` 76 - :class:`algebras.Tensor <sage.algebras.tensor_algebra.TensorAlgebra>` 77 """ 78 79 from sage.algebras.free_algebra import FreeAlgebra as Free 80 from sage.algebras.quatalg.quaternion_algebra import QuaternionAlgebra as Quaternion 81 from sage.algebras.steenrod.steenrod_algebra import SteenrodAlgebra as Steenrod 82 from sage.algebras.finite_dimensional_algebras.finite_dimensional_algebra import FiniteDimensionalAlgebra as FiniteDimensional 83 from sage.algebras.group_algebra import GroupAlgebra as Group ---> 84 from sage.algebras.clifford_algebra import CliffordAlgebra as Clifford global sage.algebras.clifford_algebra = undefined global CliffordAlgebra = undefined global Clifford = undefined 85 from sage.algebras.clifford_algebra import ExteriorAlgebra as Exterior 86 from sage.algebras.weyl_algebra import DifferentialWeylAlgebra as DifferentialWeyl 87 from sage.algebras.lie_algebras.lie_algebra import LieAlgebra as Lie 88 89 from sage.misc.lazy_import import lazy_import 90 lazy_import('sage.algebras.iwahori_hecke_algebra', 'IwahoriHeckeAlgebra', 'IwahoriHecke') 91 lazy_import('sage.algebras.nil_coxeter_algebra', 'NilCoxeterAlgebra', 'NilCoxeter') 92 lazy_import('sage.algebras.free_zinbiel_algebra', 'FreeZinbielAlgebra', 'FreeZinbiel') 93 lazy_import('sage.algebras.askey_wilson', 'AskeyWilsonAlgebra', 'AskeyWilson') 94 lazy_import('sage.algebras.hall_algebra', 'HallAlgebra', 'Hall') 95 lazy_import('sage.algebras.jordan_algebra', 'JordanAlgebra', 'Jordan') 96 lazy_import('sage.algebras.orlik_solomon', 'OrlikSolomonAlgebra', 'OrlikSolomon') 97 lazy_import('sage.algebras.orlik_terao', 'OrlikTeraoAlgebra', 'OrlikTerao') 98 lazy_import('sage.algebras.shuffle_algebra', 'ShuffleAlgebra', 'Shuffle') 99 lazy_import('sage.algebras.schur_algebra', 'SchurAlgebra', 'Schur') ~/sage-9.5/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/algebras/clifford_algebra.py in <module> 20 from sage.misc.cachefunc import cached_method 21 from sage.structure.unique_representation import UniqueRepresentation 22 from copy import copy 23 24 from sage.categories.algebras_with_basis import AlgebrasWithBasis 25 from sage.categories.hopf_algebras_with_basis import HopfAlgebrasWithBasis 26 from sage.modules.with_basis.morphism import ModuleMorphismByLinearity 27 from sage.categories.poor_man_map import PoorManMap 28 from sage.rings.integer_ring import ZZ 29 from sage.modules.free_module import FreeModule, FreeModule_generic 30 from sage.matrix.constructor import Matrix 31 from sage.matrix.args import MatrixArgs 32 from sage.sets.family import Family 33 from sage.combinat.free_module import CombinatorialFreeModule 34 from sage.combinat.subset import SubsetsSorted ---> 35 from sage.quadratic_forms.quadratic_form import QuadraticForm global sage.quadratic_forms.quadratic_form = undefined global QuadraticForm = undefined 36 from sage.algebras.weyl_algebra import repr_from_monomials 37 from sage.misc.inherit_comparison import InheritComparisonClasscallMetaclass 38 from sage.typeset.ascii_art import ascii_art 39 from sage.typeset.unicode_art import unicode_art 40 import unicodedata 41 42 43 class CliffordAlgebraElement(CombinatorialFreeModule.Element): 44 """ 45 An element in a Clifford algebra. 46 47 TESTS:: 48 49 sage: Q = QuadraticForm(ZZ, 3, [1, 2, 3, 4, 5, 6]) 50 sage: Cl.<x,y,z> = CliffordAlgebra(Q) ~/sage-9.5/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/quadratic_forms/quadratic_form.py in <module> 177 S += [-1] 178 a = QQ.hilbert_symbol_negative_at_S(S,-d) 179 a = ZZ(a) 180 P = ([p for p in P if hilbert_symbol(a, -d, p) == 1] 181 +[p for p in (2*a*d).prime_divisors() 182 if hilbert_symbol(a, -d, p)==-1 and p not in P]) 183 sminus = max(0, sminus-1) 184 rk = rk - 1 185 d = a*d 186 D.append(a.squarefree_part()) 187 d = d.squarefree_part() 188 D.append(d) 189 return DiagonalQuadraticForm(QQ,D) 190 191 --> 192 class QuadraticForm(SageObject): global QuadraticForm = undefined global SageObject = <class 'sage.structure.sage_object.SageObject'> 193 r""" 194 The ``QuadraticForm`` class represents a quadratic form in n variables with 195 coefficients in the ring R. 196 197 INPUT: 198 199 The constructor may be called in any of the following ways. 200 201 #. ``QuadraticForm(R, n, entries)``, where 202 203 - `R` -- ring for which the quadratic form is defined 204 - `n` -- an integer >= 0 205 - ``entries`` -- a list of `n(n+1)/2` coefficients of the quadratic form 206 in `R` (given lexicographically, or equivalently, by rows of the 207 matrix) ~/sage-9.5/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/quadratic_forms/quadratic_form.py in QuadraticForm() 308 local_normal_form, \ 309 jordan_blocks_by_scale_and_unimodular, \ 310 jordan_blocks_in_unimodular_list_by_scale_power 311 312 ## Routines to perform elementary variable substitutions 313 from sage.quadratic_forms.quadratic_form__variable_substitutions import \ 314 swap_variables, \ 315 multiply_variable, \ 316 divide_variable, \ 317 scale_by_factor, \ 318 extract_variables, \ 319 elementary_substitution, \ 320 add_symmetric 321 322 ## Routines to compute p-adic field invariants --> 323 from sage.quadratic_forms.quadratic_form__local_field_invariants import \ global sage.quadratic_forms.quadratic_form__local_field_invariants = undefined global rational_diagonal_form = undefined global _rational_diagonal_form_and_transformation = undefined global signature_vector = undefined global signature = undefined global hasse_invariant = undefined global hasse_invariant__OMeara = undefined global is_hyperbolic = undefined global is_anisotropic = undefined global is_isotropic = undefined global anisotropic_primes = undefined global compute_definiteness = undefined global compute_definiteness_string_by_determinants = undefined global is_positive_definite = undefined global is_negative_definite = undefined global is_indefinite = undefined global is_definite = undefined 324 rational_diagonal_form, \ 325 _rational_diagonal_form_and_transformation, \ 326 signature_vector, \ 327 signature, \ 328 hasse_invariant, \ 329 hasse_invariant__OMeara, \ 330 is_hyperbolic, \ 331 is_anisotropic, \ 332 is_isotropic, \ 333 anisotropic_primes, \ 334 compute_definiteness, \ 335 compute_definiteness_string_by_determinants, \ 336 is_positive_definite, \ 337 is_negative_definite, \ 338 is_indefinite, \ ~/sage-9.5/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/quadratic_forms/quadratic_form__local_field_invariants.py in <module> 15 # (at your option) any later version. 16 # http://www.gnu.org/licenses/ 17 #***************************************************************************** 18 19 ########################################################################### 20 ## TO DO: Add routines for hasse invariants at all places, anisotropic 21 ## places, is_semi_definite, and support for number fields. 22 ########################################################################### 23 24 25 from copy import deepcopy 26 from sage.rings.integer_ring import ZZ 27 from sage.rings.rational_field import QQ 28 from sage.rings.real_mpfr import RR 29 from sage.arith.all import prime_divisors, hilbert_symbol ---> 30 from sage.functions.all import sgn global sage.functions.all = undefined global sgn = undefined 31 from sage.matrix.matrix_space import MatrixSpace 32 from sage.misc.cachefunc import cached_method 33 34 35 def rational_diagonal_form(self, return_matrix=False): 36 """ 37 Return a diagonal form equivalent to the given quadratic from 38 over the fraction field of its defining ring. 39 40 INPUT: 41 42 - ``return_matrix`` -- (boolean, default: False) also return the 43 transformation matrix 44 45 OUTPUT: either ``D`` (if ``return_matrix`` is false) or ``(D,T)`` ~/sage-9.5/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/functions/all.py in <module> 53 gen_legendre_P, 54 gen_legendre_Q, 55 hermite, 56 jacobi_P, 57 laguerre, 58 legendre_P, 59 legendre_Q, 60 ultraspherical, 61 gegenbauer, 62 krawtchouk, 63 meixner, 64 hahn) 65 66 from .spike_function import spike_function 67 ---> 68 from .prime_pi import legendre_phi, partial_sieve_function, prime_pi global prime_pi = undefined global legendre_phi = undefined global partial_sieve_function = undefined 69 70 from .wigner import (wigner_3j, clebsch_gordan, racah, wigner_6j, 71 wigner_9j, gaunt) 72 73 from .generalized import (dirac_delta, heaviside, unit_step, sgn, sign, 74 kronecker_delta) 75 76 from .min_max import max_symbolic, min_symbolic 77 78 from .airy import airy_ai, airy_ai_prime, airy_bi, airy_bi_prime 79 80 from .exp_integral import (exp_integral_e, exp_integral_e1, log_integral, li, Li, 81 log_integral_offset, 82 sin_integral, cos_integral, Si, Ci, 83 sinh_integral, cosh_integral, Shi, Chi, ~/sage-9.5/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/functions/prime_pi.pyx in init sage.functions.prime_pi (build/cythonized/sage/functions/prime_pi.c:5928)() 22 True 23 """ 24 25 # **************************************************************************** 26 # Copyright (C) 2009,2011 R. Andrew Ohana <andrew.oh...@gmail.com> 27 # Copyright (C) 2009 William Stein <wst...@gmail.com> 28 # 29 # Distributed under the terms of the GNU General Public License (GPL) 30 # as published by the Free Software Foundation; either version 2 of 31 # the License, or (at your option) any later version. 32 # https://www.gnu.org/licenses/ 33 # **************************************************************************** 34 35 from sage.rings.integer cimport Integer 36 from sage.symbolic.function cimport BuiltinFunction ---> 37 from primecountpy.primecount import prime_pi as _prime_pi global primecountpy.primecount = undefined global prime_pi = undefined global _prime_pi = undefined 38 from primecountpy.primecount import phi as _phi 39 40 cdef class PrimePi(BuiltinFunction): 41 def __init__(self): 42 r""" 43 The prime counting function, which counts the number of primes less 44 than or equal to a given value. 45 46 INPUT: 47 48 - ``x`` - a real number 49 - ``prime_bound`` - (default 0) a real number < 2^32, ``prime_pi`` will 50 make sure to use all the primes up to ``prime_bound`` (although, 51 possibly more) in computing ``prime_pi``, this can potentially 52 speedup the time of computation, at a cost to memory usage. ~/sage-9.5/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/primecountpy/__init__.py in <module> ----> 1 from .primecount import * global primecount = undefined ImportError: dlopen(/Users/yueqili/sage-9.5/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/primecountpy/primecount.cpython-310-darwin.so, 2): Library not loaded: /opt/homebrew/opt/primesieve/lib/libprimesieve.9.dylib Referenced from: /Users/yueqili/sage-9.5/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/primecountpy/primecount.cpython-310-darwin.so Reason: image not found *************************************************************************** History of session input: *** Last line of input (may not be in above history):