Red Hat Bugzilla – Bug 1464520
Missing python2 deps
Last modified: 2018-03-16 11:12:09 EDT
Description of problem: sage crashes with stacktrace on fresh install of F26. ``` erebus\> sage ┌────────────────────────────────────────────────────────────────────┐ │ SageMath version 7.6, Release Date: 2017-03-25 │ │ Type "notebook()" for the browser-based notebook interface. │ │ Type "help()" for help. │ └────────────────────────────────────────────────────────────────────┘ Traceback (most recent call last): File "/usr/lib64/sagemath/local/bin/sage-ipython", line 7, in <module> from sage.repl.interpreter import SageTerminalApp File "/usr/lib64/python2.7/site-packages/sage/repl/interpreter.py", line 108, in <module> from sage.repl.prompts import SagePrompts, InterfacePrompts File "/usr/lib64/python2.7/site-packages/sage/repl/prompts.py", line 16, in <module> from IPython.terminal.prompts import Prompts File "/usr/lib64/sagemath/site-packages/IPython/__init__.py", line 48, in <module> from .core.application import Application File "/usr/lib64/sagemath/site-packages/IPython/core/application.py", line 23, in <module> from traitlets.config.application import Application, catch_config_error ImportError: No module named traitlets.config.application ``` Version-Release number of selected component (if applicable): - sagemath-7.6-3.fc26.x86_64 How reproducible: - always (F26) Steps to Reproduce: 1. $ sudo dnf install -y sagemath 2. $ sage Actual results: - fails to initialize Expected results: - sagemath should initialize Additional info: The error appears to be resolved by installing missing python2 dependencies: - python2-traitlets - python2-backports-shutil_get_terminal_size Cheers, David
Scratch that - I got it working on one box, not on another. There must be more missing in the dependency chain. I'll see if I can identify what's missing.
Found it. Issue appears resolved by: $ sudo dnf install -y python2-backports-shutil_get_terminal_size python2-psutil python2-simplegeneric python2-traitlets $ sudo ln -s /usr/lib64/libSingular-4.1.0.so /usr/lib64/libSingular.so corymbus\> sudo dnf repoquery --whatprovides /usr/lib64/libSingular.so Last metadata expiration check: 1:52:44 ago on Fri 23 Jun 2017 11:43:28 AM EDT. Singular-devel-0:4.1.0p2-1.fc26.x86_64 Singular-devel-0:4.1.0p3-2.fc26.x86_64
I can corroborate this problem on Fedora 26: $ sage ┌────────────────────────────────────────────────────────────────────┐ │ SageMath version 7.6, Release Date: 2017-03-25 │ │ Type "notebook()" for the browser-based notebook interface. │ │ Type "help()" for help. │ └────────────────────────────────────────────────────────────────────┘ Traceback (most recent call last): File "/usr/lib64/sagemath/local/bin/sage-ipython", line 7, in <module> from sage.repl.interpreter import SageTerminalApp File "/usr/lib64/python2.7/site-packages/sage/repl/interpreter.py", line 108, in <module> from sage.repl.prompts import SagePrompts, InterfacePrompts File "/usr/lib64/python2.7/site-packages/sage/repl/prompts.py", line 16, in <module> from IPython.terminal.prompts import Prompts File "/usr/lib64/sagemath/site-packages/IPython/__init__.py", line 48, in <module> from .core.application import Application File "/usr/lib64/sagemath/site-packages/IPython/core/application.py", line 25, in <module> from IPython.core import release, crashhandler File "/usr/lib64/sagemath/site-packages/IPython/core/crashhandler.py", line 28, in <module> from IPython.core import ultratb File "/usr/lib64/sagemath/site-packages/IPython/core/ultratb.py", line 128, in <module> from IPython.utils.terminal import get_terminal_size File "/usr/lib64/sagemath/site-packages/IPython/utils/terminal.py", line 22, in <module> from backports.shutil_get_terminal_size import get_terminal_size as _get_terminal_size ImportError: No module named shutil_get_terminal_size Unlike python2-traitlets, this problem doesn't go away when I install python2-backports-shutil_get_terminal_size. Also something else: the /usr/bin/sage script uses `bash -i` as interpreter, which is kind of annoying, as it leaves a bunch of extraneous stuff on .bash_history.
IPython post-mortem report {'commit_hash': u'5c9c918', 'commit_source': 'installation', 'default_encoding': 'ANSI_X3.4-1968', 'ipython_path': '/usr/lib64/sagemath/site-packages/IPython', 'ipython_version': '5.1.0', 'os_name': 'posix', 'platform': 'Linux-4.11.11-300.fc26.x86_64-x86_64-with-fedora-26-Twenty_Six', 'sys_executable': '/usr/lib64/sagemath/local/bin/python', 'sys_platform': 'linux2', 'sys_version': '2.7.13 (default, Jun 26 2017, 10:20:05) \n[GCC 7.1.1 20170622 (Red Hat 7.1.1-3)]'} Last line of .ipython/Sage_crash_report.txt is: ImportError: No module named psutil 'dnf install python2-psutil' solves the issue for me.
Issue still present on F27, solved by: dnf install python2-backports-shutil_get_terminal_size python2-psutil python2-simplegeneric python2-traitlets Would someone add these dependencies please?