[关闭]
@mistake 2017-11-07T10:34:24.000000Z 字数 15652 阅读 646

Sage_crash_report.txt

未分类


  1. ***************************************************************************
  2. IPython post-mortem report
  3. {'commit_hash': u'5c9c918',
  4. 'commit_source': 'installation',
  5. 'default_encoding': 'UTF-8',
  6. 'ipython_path': '/home/think/Documents/kits/SageMath/local/lib/python2.7/site-packages/IPython',
  7. 'ipython_version': '5.1.0',
  8. 'os_name': 'posix',
  9. 'platform': 'Linux-4.10.0-38-generic-x86_64-with-debian-stretch-sid',
  10. 'sys_executable': '/home/think/Documents/kits/SageMath/local/bin/python',
  11. 'sys_platform': 'linux2',
  12. 'sys_version': '2.7.13 (default, Jul 22 2017, 10:05:34) \n[GCC 5.4.0 20160609]'}
  13. ***************************************************************************
  14. ***************************************************************************
  15. Crash traceback:
  16. ---------------------------------------------------------------------------
  17. ---------------------------------------------------------------------------
  18. ImportErrorPython 2.7.13: /home/think/Documents/kits/SageMath/local/bin/python
  19. Tue Nov 7 17:33:03 2017
  20. A problem occurred executing Python code. Here is the sequence of function
  21. calls leading up to the error, with the most recent (innermost) call last.
  22. /home/think/Documents/kits/SageMath/src/bin/sage-ipython in <module>()
  23. 1 #!/usr/bin/env python
  24. 2 # -*- coding: utf-8 -*-
  25. 3 """
  26. 4 Sage IPython startup script.
  27. 5 """
  28. 6
  29. 7 from sage.repl.interpreter import SageTerminalApp
  30. 8
  31. 9 app = SageTerminalApp.instance()
  32. ---> 10 app.initialize()
  33. global app.initialize = <bound method SageTerminalApp.initialize of <sage.repl.interpreter.SageTerminalApp object at 0x7f3012e8e0d0>>
  34. 11 app.start()
  35. <decorator-gen-109> in initialize(self=<sage.repl.interpreter.SageTerminalApp object>, argv=None)
  36. /home/think/Documents/kits/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={})
  37. 72 TRAITLETS_APPLICATION_RAISE_CONFIG_FILE_ERROR = False
  38. 73 else:
  39. 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 )
  40. 75
  41. 76
  42. 77 @decorator
  43. 78 def catch_config_error(method, app, *args, **kwargs):
  44. 79 """Method decorator for catching invalid config (Trait/ArgumentErrors) during init.
  45. 80
  46. 81 On a TraitError (generally caused by bad config), this will print the trait's
  47. 82 message, and exit the app.
  48. 83
  49. 84 For use on init methods, to prevent invoking excepthook on invalid input.
  50. 85 """
  51. 86 try:
  52. ---> 87 return method(app, *args, **kwargs)
  53. method = <function initialize at 0x7f300b5c9aa0>
  54. app = <sage.repl.interpreter.SageTerminalApp object at 0x7f3012e8e0d0>
  55. args = (None,)
  56. kwargs = {}
  57. 88 except (TraitError, ArgumentError) as e:
  58. 89 app.print_help()
  59. 90 app.log.fatal("Bad config encountered during initialization:")
  60. 91 app.log.fatal(str(e))
  61. 92 app.log.debug("Config at the time: %s", app.config)
  62. 93 app.exit(1)
  63. 94
  64. 95
  65. 96 class ApplicationError(Exception):
  66. 97 pass
  67. 98
  68. 99
  69. 100 class LevelFormatter(logging.Formatter):
  70. 101 """Formatter with additional `highlevel` record
  71. 102
  72. /home/think/Documents/kits/SageMath/local/lib/python2.7/site-packages/IPython/terminal/ipapp.pyc in initialize(self=<sage.repl.interpreter.SageTerminalApp object>, argv=None)
  73. 294
  74. 295 return super(TerminalIPythonApp, self).parse_command_line(argv)
  75. 296
  76. 297 @catch_config_error
  77. 298 def initialize(self, argv=None):
  78. 299 """Do actions after construct, but before starting the app."""
  79. 300 super(TerminalIPythonApp, self).initialize(argv)
  80. 301 if self.subapp is not None:
  81. 302 # don't bother initializing further, starting subapp
  82. 303 return
  83. 304 # print self.extra_args
  84. 305 if self.extra_args and not self.something_to_run:
  85. 306 self.file_to_run = self.extra_args[0]
  86. 307 self.init_path()
  87. 308 # create the shell
  88. --> 309 self.init_shell()
  89. self.init_shell = <bound method SageTerminalApp.init_shell of <sage.repl.interpreter.SageTerminalApp object at 0x7f3012e8e0d0>>
  90. 310 # and draw the banner
  91. 311 self.init_banner()
  92. 312 # Now a variety of things that happen after the banner is printed.
  93. 313 self.init_gui_pylab()
  94. 314 self.init_extensions()
  95. 315 self.init_code()
  96. 316
  97. 317 def init_shell(self):
  98. 318 """initialize the InteractiveShell instance"""
  99. 319 # Create an InteractiveShell instance.
  100. 320 # shell.display_banner should always be False for the terminal
  101. 321 # based app, because we call shell.show_banner() by hand below
  102. 322 # so the banner shows *before* all extension loading stuff.
  103. 323 self.shell = TerminalInteractiveShell.instance(parent=self,
  104. 324 profile_dir=self.profile_dir,
  105. /home/think/Documents/kits/SageMath/local/lib/python2.7/site-packages/sage/repl/interpreter.pyc in init_shell(self=<sage.repl.interpreter.SageTerminalApp object>)
  106. 747 self.shell.has_sage_extensions = SAGE_EXTENSION in self.extensions
  107. 748
  108. 749 # Load the %lprun extension if available
  109. 750 try:
  110. 751 import line_profiler
  111. 752 except ImportError:
  112. 753 pass
  113. 754 else:
  114. 755 self.extensions.append('line_profiler')
  115. 756
  116. 757 if self.shell.has_sage_extensions:
  117. 758 self.extensions.remove(SAGE_EXTENSION)
  118. 759
  119. 760 # load sage extension here to get a crash if
  120. 761 # something is wrong with the sage library
  121. --> 762 self.shell.extension_manager.load_extension(SAGE_EXTENSION)
  122. self.shell.extension_manager.load_extension = <bound method ExtensionManager.load_extension of <IPython.core.extensions.ExtensionManager object at 0x7f300a242450>>
  123. global SAGE_EXTENSION = 'sage'
  124. 763
  125. 764
  126. /home/think/Documents/kits/SageMath/local/lib/python2.7/site-packages/IPython/core/extensions.pyc in load_extension(self=<IPython.core.extensions.ExtensionManager object>, module_str='sage')
  127. 70
  128. 71 Returns the string "already loaded" if the extension is already loaded,
  129. 72 "no load function" if the module doesn't have a load_ipython_extension
  130. 73 function, or None if it succeeded.
  131. 74 """
  132. 75 if module_str in self.loaded:
  133. 76 return "already loaded"
  134. 77
  135. 78 from IPython.utils.syspathcontext import prepended_to_syspath
  136. 79
  137. 80 with self.shell.builtin_trap:
  138. 81 if module_str not in sys.modules:
  139. 82 with prepended_to_syspath(self.ipython_extension_dir):
  140. 83 __import__(module_str)
  141. 84 mod = sys.modules[module_str]
  142. ---> 85 if self._call_load_ipython_extension(mod):
  143. self._call_load_ipython_extension = <bound method ExtensionManager._call_load_ipython_extension of <IPython.core.extensions.ExtensionManager object at 0x7f300a242450>>
  144. mod = <module 'sage' from '/home/think/Documents/kits/SageMath/local/lib/python2.7/site-packages/sage/__init__.pyc'>
  145. 86 self.loaded.add(module_str)
  146. 87 else:
  147. 88 return "no load function"
  148. 89
  149. 90 def unload_extension(self, module_str):
  150. 91 """Unload an IPython extension by its module name.
  151. 92
  152. 93 This function looks up the extension's name in ``sys.modules`` and
  153. 94 simply calls ``mod.unload_ipython_extension(self)``.
  154. 95
  155. 96 Returns the string "no unload function" if the extension doesn't define
  156. 97 a function to unload itself, "not loaded" if the extension isn't loaded,
  157. 98 otherwise None.
  158. 99 """
  159. 100 if module_str not in self.loaded:
  160. /home/think/Documents/kits/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/think/Documents/kits/...l/lib/python2.7/site-packages/sage/__init__.pyc'>)
  161. 117 """
  162. 118 from IPython.utils.syspathcontext import prepended_to_syspath
  163. 119
  164. 120 if (module_str in self.loaded) and (module_str in sys.modules):
  165. 121 self.unload_extension(module_str)
  166. 122 mod = sys.modules[module_str]
  167. 123 with prepended_to_syspath(self.ipython_extension_dir):
  168. 124 reload(mod)
  169. 125 if self._call_load_ipython_extension(mod):
  170. 126 self.loaded.add(module_str)
  171. 127 else:
  172. 128 self.load_extension(module_str)
  173. 129
  174. 130 def _call_load_ipython_extension(self, mod):
  175. 131 if hasattr(mod, 'load_ipython_extension'):
  176. --> 132 mod.load_ipython_extension(self.shell)
  177. mod.load_ipython_extension = <function load_ipython_extension at 0x7f3012efcaa0>
  178. self.shell = <sage.repl.interpreter.SageTerminalInteractiveShell object at 0x7f300b572950>
  179. 133 return True
  180. 134
  181. 135 def _call_unload_ipython_extension(self, mod):
  182. 136 if hasattr(mod, 'unload_ipython_extension'):
  183. 137 mod.unload_ipython_extension(self.shell)
  184. 138 return True
  185. 139
  186. 140 def install_extension(self, url, filename=None):
  187. 141 """Download and install an IPython extension.
  188. 142
  189. 143 If filename is given, the file will be so named (inside the extension
  190. 144 directory). Otherwise, the name from the URL will be used. The file must
  191. 145 have a .py or .zip extension; otherwise, a ValueError will be raised.
  192. 146
  193. 147 Returns the full path to the installed file.
  194. /home/think/Documents/kits/SageMath/local/lib/python2.7/site-packages/sage/__init__.pyc in load_ipython_extension(*args=(<sage.repl.interpreter.SageTerminalInteractiveShell object>,))
  195. 1 __all__ = ['all']
  196. 2
  197. 3 # Make sure that the correct zlib library is loaded. This is needed
  198. 4 # to prevent the system zlib to be loaded instead of the Sage one.
  199. 5 # See https://trac.sagemath.org/ticket/23122
  200. 6 import zlib
  201. 7
  202. 8 # IPython calls this when starting up
  203. 9 def load_ipython_extension(*args):
  204. 10 import sage.repl.ipython_extension
  205. ---> 11 sage.repl.ipython_extension.load_ipython_extension(*args)
  206. sage.repl.ipython_extension.load_ipython_extension = <function load_ipython_extension at 0x7f3009da1668>
  207. args = (<sage.repl.interpreter.SageTerminalInteractiveShell object at 0x7f300b572950>,)
  208. /home/think/Documents/kits/SageMath/local/lib/python2.7/site-packages/sage/repl/ipython_extension.pyc in wrapper(*args=(<sage.repl.interpreter.SageTerminalInteractiveShell object>,), **kwargs={})
  209. 546 ....: if work:
  210. 547 ....: return 'foo worked'
  211. 548 ....: raise RuntimeError("foo didn't work")
  212. 549 sage: foo(False)
  213. 550 Traceback (most recent call last):
  214. 551 ...
  215. 552 RuntimeError: foo didn't work
  216. 553 sage: foo(True)
  217. 554 'foo worked'
  218. 555 sage: foo(False)
  219. 556 sage: foo(True)
  220. 557 """
  221. 558 @wraps(func)
  222. 559 def wrapper(*args, **kwargs):
  223. 560 if not wrapper.has_run:
  224. --> 561 result = func(*args, **kwargs)
  225. result = undefined
  226. global func = undefined
  227. args = (<sage.repl.interpreter.SageTerminalInteractiveShell object at 0x7f300b572950>,)
  228. kwargs = {}
  229. 562 wrapper.has_run = True
  230. 563 return result
  231. 564 wrapper.has_run = False
  232. 565 return wrapper
  233. 566
  234. 567
  235. 568 @run_once
  236. 569 def load_ipython_extension(ip):
  237. 570 """
  238. 571 Load the extension in IPython.
  239. 572 """
  240. 573 # this modifies ip
  241. 574 SageCustomizations(shell=ip)
  242. /home/think/Documents/kits/SageMath/local/lib/python2.7/site-packages/sage/repl/ipython_extension.pyc in load_ipython_extension(ip=<sage.repl.interpreter.SageTerminalInteractiveShell object>)
  243. 559 def wrapper(*args, **kwargs):
  244. 560 if not wrapper.has_run:
  245. 561 result = func(*args, **kwargs)
  246. 562 wrapper.has_run = True
  247. 563 return result
  248. 564 wrapper.has_run = False
  249. 565 return wrapper
  250. 566
  251. 567
  252. 568 @run_once
  253. 569 def load_ipython_extension(ip):
  254. 570 """
  255. 571 Load the extension in IPython.
  256. 572 """
  257. 573 # this modifies ip
  258. --> 574 SageCustomizations(shell=ip)
  259. global SageCustomizations = <class 'sage.repl.ipython_extension.SageCustomizations'>
  260. global shell = undefined
  261. ip = <sage.repl.interpreter.SageTerminalInteractiveShell object at 0x7f300b572950>
  262. /home/think/Documents/kits/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>)
  263. 417 def __init__(self, shell=None):
  264. 418 """
  265. 419 Initialize the Sage plugin.
  266. 420 """
  267. 421 self.shell = shell
  268. 422
  269. 423 self.auto_magics = SageMagics(shell)
  270. 424 self.shell.register_magics(self.auto_magics)
  271. 425
  272. 426 import sage.misc.edit_module as edit_module
  273. 427 self.shell.set_hook('editor', edit_module.edit_devel)
  274. 428
  275. 429 self.init_inspector()
  276. 430 self.init_line_transforms()
  277. 431
  278. --> 432 import sage.all # until sage's import hell is fixed
  279. sage.all = undefined
  280. 433
  281. 434 self.shell.verbose_quit = True
  282. 435 self.set_quit_hook()
  283. 436
  284. 437 self.register_interface_magics()
  285. 438
  286. 439 if SAGE_IMPORTALL == 'yes':
  287. 440 self.init_environment()
  288. 441
  289. 442 def register_interface_magics(self):
  290. 443 """
  291. 444 Register magics for each of the Sage interfaces
  292. 445 """
  293. 446 from sage.repl.interface_magic import InterfaceMagic
  294. 447 InterfaceMagic.register_all(self.shell)
  295. /home/think/Documents/kits/SageMath/local/lib/python2.7/site-packages/sage/all.py in <module>()
  296. 72
  297. 73 # Add SAGE_SRC at the end of sys.path to enable Cython tracebacks
  298. 74 # (which use paths relative to SAGE_SRC)
  299. 75 sys.path.append(SAGE_SRC)
  300. 76
  301. 77
  302. 78 ###################################################################
  303. 79
  304. 80 # This import also setups the interrupt handler
  305. 81 from cysignals.signals import (AlarmInterrupt, SignalError,
  306. 82 sig_on_reset as sig_on_count)
  307. 83
  308. 84 from time import sleep
  309. 85
  310. 86 import sage.misc.lazy_import
  311. ---> 87 from sage.misc.all import * # takes a while
  312. global sage.misc.all = undefined
  313. 88 from sage.typeset.all import *
  314. 89 from sage.repl.all import *
  315. 90
  316. 91 from sage.misc.sh import sh
  317. 92
  318. 93 from sage.libs.all import *
  319. 94 from sage.data_structures.all import *
  320. 95 from sage.doctest.all import *
  321. 96
  322. 97 from sage.structure.all import *
  323. 98 from sage.rings.all import *
  324. 99 from sage.arith.all import *
  325. 100 from sage.matrix.all import *
  326. 101
  327. 102 from sage.symbolic.all import *
  328. /home/think/Documents/kits/SageMath/local/lib/python2.7/site-packages/sage/misc/all.py in <module>()
  329. 69
  330. 70 from .defaults import (set_default_variable_name,
  331. 71 series_precision, set_series_precision)
  332. 72
  333. 73 from .sage_eval import sage_eval, sageobj
  334. 74
  335. 75 from .sage_input import sage_input
  336. 76
  337. 77 lazy_import("sage.misc.cython", ["cython_lambda", "cython_create_local_so"])
  338. 78 lazy_import("sage.misc.cython_c", "cython_compile", "cython")
  339. 79
  340. 80 from .persist import save, load, dumps, loads, db, db_save
  341. 81
  342. 82 from .func_persist import func_persist
  343. 83
  344. ---> 84 from .functional import (additive_order,
  345. global functional = undefined
  346. global additive_order = undefined
  347. global base_ring = undefined
  348. global base_field = undefined
  349. global basis = undefined
  350. global category = undefined
  351. global charpoly = undefined
  352. global characteristic_polynomial = undefined
  353. global coerce = undefined
  354. global cyclotomic_polynomial = undefined
  355. global decomposition = undefined
  356. global denominator = undefined
  357. global det = undefined
  358. global dimension = undefined
  359. global dim = undefined
  360. global discriminant = undefined
  361. global disc = undefined
  362. global eta = undefined
  363. global fcp = undefined
  364. global gen = undefined
  365. global gens = undefined
  366. global hecke_operator = undefined
  367. global image = undefined
  368. global integral = undefined
  369. global integrate = undefined
  370. global integral_closure = undefined
  371. global interval = undefined
  372. global xinterval = undefined
  373. global is_commutative = undefined
  374. global is_even = undefined
  375. global is_integrally_closed = undefined
  376. global is_field = undefined
  377. global is_odd = undefined
  378. global kernel = undefined
  379. global krull_dimension = undefined
  380. global lift = undefined
  381. global log = undefined
  382. global log_b = undefined
  383. global minimal_polynomial = undefined
  384. global minpoly = undefined
  385. global multiplicative_order = undefined
  386. global ngens = undefined
  387. global norm = undefined
  388. global numerator = undefined
  389. global numerical_approx = undefined
  390. global n = undefined
  391. global N = undefined
  392. global objgens = undefined
  393. global objgen = undefined
  394. global order = undefined
  395. global rank = undefined
  396. global regulator = undefined
  397. global round = undefined
  398. global quotient = undefined
  399. global quo = undefined
  400. global isqrt = undefined
  401. global squarefree_part = undefined
  402. global symbolic_sum = undefined
  403. global sum = undefined
  404. global symbolic_prod = undefined
  405. global product = undefined
  406. global transpose = undefined
  407. 85 base_ring,
  408. 86 base_field,
  409. 87 basis,
  410. 88 category,
  411. 89 charpoly,
  412. 90 characteristic_polynomial,
  413. 91 coerce,
  414. 92 cyclotomic_polynomial,
  415. 93 decomposition,
  416. 94 denominator,
  417. 95 det,
  418. 96 dimension,
  419. 97 dim,
  420. 98 discriminant,
  421. 99 disc,
  422. /home/think/Documents/kits/SageMath/local/lib/python2.7/site-packages/sage/misc/functional.py in <module>()
  423. 17 #
  424. 18 # This program is free software: you can redistribute it and/or modify
  425. 19 # it under the terms of the GNU General Public License as published by
  426. 20 # the Free Software Foundation, either version 2 of the License, or
  427. 21 # (at your option) any later version.
  428. 22 # http://www.gnu.org/licenses/
  429. 23 #*****************************************************************************
  430. 24 from __future__ import absolute_import
  431. 25 from six.moves import range, builtins
  432. 26 from six import integer_types
  433. 27
  434. 28 import sage.misc.latex
  435. 29 import sage.interfaces.expect
  436. 30 import sage.interfaces.mathematica
  437. 31
  438. ---> 32 from sage.rings.complex_double import CDF
  439. global sage.rings.complex_double = undefined
  440. global CDF = undefined
  441. 33 from sage.rings.real_double import RDF, RealDoubleElement
  442. 34
  443. 35 import sage.rings.real_mpfr
  444. 36 import sage.rings.complex_field
  445. 37 import sage.rings.integer
  446. 38
  447. 39 ##############################################################################
  448. 40 # There are many functions on elements of a ring, which mathematicians
  449. 41 # usually write f(x), e.g., it is weird to write x.log() and natural
  450. 42 # to write log(x). The functions below allow for the more familiar syntax.
  451. 43 ##############################################################################
  452. 44 def additive_order(x):
  453. 45 """
  454. 46 Returns the additive order of `x`.
  455. 47
  456. ImportError: libgfortran.so.3: cannot open shared object file: No such file or directory
  457. ***************************************************************************
  458. History of session input:
  459. *** Last line of input (may not be in above history):
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注