Advertisement
Guest User

Untitled

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