This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1464520 - Missing python2 deps
Missing python2 deps
Status: NEW
Product: Fedora
Classification: Fedora
Component: sagemath (Show other bugs)
26
Unspecified Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Paulo Andrade
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-23 12:04 EDT by David Goerger
Modified: 2017-09-14 11:14 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Goerger 2017-06-23 12:04:35 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
Comment 1 David Goerger 2017-06-23 13:06:16 EDT
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.
Comment 2 David Goerger 2017-06-23 13:39:54 EDT
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
Comment 3 Robert Holmes 2017-07-12 00:31:11 EDT
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.
Comment 4 Eric M 2017-07-29 16:13:52 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.