Bug 1464520 - Missing python2 deps
Summary: Missing python2 deps
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: sagemath
Version: 28
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Paulo Andrade
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1572778 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-23 16:04 UTC by David Goerger
Modified: 2019-05-28 19:22 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-28 19:22:06 UTC


Attachments (Terms of Use)

Description David Goerger 2017-06-23 16:04:35 UTC
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 17:06:16 UTC
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 17:39:54 UTC
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 04:31:11 UTC
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 20:13:52 UTC
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.

Comment 5 Michael J Gruber 2018-03-16 15:12:09 UTC
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?

Comment 6 Fedora End Of Life 2018-05-03 08:09:48 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 7 Michael J Gruber 2018-05-03 09:00:33 UTC
Issue still present or got worse.

After an upgrade from F27 to F28, sagemath crashes. Missing dep is (at least) python2-cypari2.

Comment 8 Michal Ambroz 2018-06-22 17:40:56 UTC
Same here. Issue present on F28. Fresh install of sagemath
And here the same https://levlaz.org/installing-sage-math-on-fedora-28/


dnf -y install sagemath
sage 

=> Crash

$ grep -e "^ImportError"  /home/mambroz/.ipython/Sage_crash_report.txt
ImportError             Python 2.7.15: /usr/lib64/sagemath/local/bin/python
ImportError: No module named cypari2.gen


Workaround:
dnf -y install python2-cypari2

Comment 9 Michal Ambroz 2018-06-22 17:46:17 UTC
*** Bug 1572778 has been marked as a duplicate of this bug. ***

Comment 10 jman012345 2018-07-18 16:52:37 UTC
Checking in to confirm this is still a bug. How has this not been fixed in over a year??

I had to install lua and python2-cypari2 to get sagemath to install correctly.

Comment 11 leyenson 2018-08-26 17:39:40 UTC
(In reply to jman012345 from comment #10)
> Checking in to confirm this is still a bug. How has this not been fixed in
> over a year??

Confirming. This is still a bus as of August 26, 2018. Installing python2-cypari2 solved the issue. Thank you to teh SageMath group people who pointed this out to me.

Comment 12 Ben Cotton 2019-05-02 21:01:56 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 13 jman012345 2019-05-06 17:07:05 UTC
Seems to be fixed in Fedora 30. I was able to install and run sage without a problem after upgrading via a clean install.

Comment 14 Ben Cotton 2019-05-28 19:22:06 UTC
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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