cschwan / sage-on-gentoo

(Unofficial) Gentoo Overlay for Sage- and Sage-related ebuilds
84 stars 26 forks source link

ImportError: cannot import name create_prompt_application #528

Closed potuz closed 5 years ago

potuz commented 5 years ago

After an update today I get

$ sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 8.4, Release Date: 2018-10-17                     │
│ Type "notebook()" for the browser-based notebook interface.        │
│ Type "help()" for help.                                            │
└────────────────────────────────────────────────────────────────────┘
Traceback (most recent call last):
  File "/usr/lib/python-exec/python2.7/sage-ipython", line 12, in <module>
    from sage.repl.interpreter import SageTerminalApp
  File "/usr/lib64/python2.7/site-packages/sage/repl/interpreter.py", line 109, 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/python2.7/site-packages/IPython/__init__.py", line 49, in <module>
    from .terminal.embed import embed
  File "/usr/lib64/python2.7/site-packages/IPython/terminal/embed.py", line 18, in <module>
    from IPython.terminal.interactiveshell import TerminalInteractiveShell
  File "/usr/lib64/python2.7/site-packages/IPython/terminal/interactiveshell.py", line 20, in <module>
    from prompt_toolkit.shortcuts import create_prompt_application, create_eventloop, create_prompt_layout, create_output
ImportError: cannot import name create_prompt_application

dev-python/ipython-5.8.0:0 dev-python/prompt_toolkit-2.0.6:0

potuz commented 5 years ago

Downgrading to dev-python/prompt_toolkit-1.0.15 solves the issue, so it may be similar to https://github.com/jupyter/jupyter_console/issues/158

kiwifb commented 5 years ago

I haven't looked at the issue but probably. Because those are packages from the main tree, that's where it needs fixing. There is already an entry in bugzilla for this https://bugs.gentoo.org/669926 with links to more details. ipython <6 will not be compatible with prompt_toolkit >2. So main tree has to fix its dependencies.

kiwifb commented 5 years ago

Fixed in the main tree. Closing.