Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prompt-toolkit requirement conflict #370

Open
drasmuss opened this issue Sep 28, 2018 · 9 comments

Comments

@drasmuss
Copy link

@drasmuss drasmuss commented Sep 28, 2018

jupyter requires jupyter-console and ipykernel. jupyter-console==5.2.0 (the most recent) requires prompt-toolkit<2.0.0, but ipykernel==5.0.0 (the most recent) requires prompt-toolkit>=2.0.0. prompt-toolkit-1.0.15 ends up being installed, which results in

>python -c "import ipykernel"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "...\lib\site-packages\ipykernel\__init__.py", line 2, in <module>
    from .connect import *
  File "...\lib\site-packages\ipykernel\connect.py", line 13, in <module>
    from IPython.core.profiledir import ProfileDir
  File "...\lib\site-packages\IPython\__init__.py", line 55, in <module>
    from .terminal.embed import embed
  File "...\lib\site-packages\IPython\terminal\embed.py", line 16, in <module>
    from IPython.terminal.interactiveshell import TerminalInteractiveShell
  File "...\lib\site-packages\IPython\terminal\interactiveshell.py", line 20, in <module>
    from prompt_toolkit.formatted_text import PygmentsTokens
ImportError: No module named 'prompt_toolkit.formatted_text'

This occurs when doing pip install jupyter, in Python 3.5. It is triggered by the new release of ipykernel 5.0.0.

drasmuss added a commit to nengo/nengo-dl that referenced this issue Sep 28, 2018
There is an internal conflict in the jupyter dependencies otherwise (see jupyter/jupyter#370)
@nkarki

This comment has been minimized.

Copy link

@nkarki nkarki commented Sep 30, 2018

I'm seeing the same issue on my osx system. The only difference is I'm on python 3.7. I saw the conflict with prompt toolkit dependency issue only when I tried to reinstall ipykernel.

@raunaks13

This comment has been minimized.

Copy link

@raunaks13 raunaks13 commented Sep 30, 2018

The problem is with the recent ipykernel update. A temporary fix could be:

pip uninstall ipykernel
pip install ipykernel==4.8.0

@saubhik

This comment has been minimized.

Copy link

@saubhik saubhik commented Oct 1, 2018

I had to do the following:

pip uninstall ipython
pip install ipython==6.5.0

ipython==6.5.0 works with prompt-toolkit-1.0.15 which gets installed when you do pip install jupyter.

@nkarki

This comment has been minimized.

Copy link

@nkarki nkarki commented Oct 1, 2018

Both @raunaks13 and @saubhik 's solutions work provided you remove jupyter.

muupan added a commit to muupan/chainerrl that referenced this issue Oct 2, 2018
@bingblackbean

This comment has been minimized.

Copy link

@bingblackbean bingblackbean commented Oct 2, 2018

The problem is with the recent ipykernel update. A temporary fix could be:

pip uninstall ipykernel
pip install ipykernel==4.8.0

thanks, I only do this : pip install ipykernel.
then system does this:

  • Installing collected packages: prompt-toolkit
  • Found existing installation: prompt-toolkit 1.0.15
  • Uninstalling prompt-toolkit-1.0.15:
    
  •   Successfully uninstalled prompt-toolkit-1.0.15
    
  • Successfully installed prompt-toolkit-2.0.5

Anyway, it works for me

@kubra1tas

This comment has been minimized.

Copy link

@kubra1tas kubra1tas commented May 5, 2019

I first downloaded 1.0.15 and then I was able to download 2.0.9. Maybe you can try that, too.

@lmeyerov

This comment has been minimized.

Copy link

@lmeyerov lmeyerov commented Jul 25, 2019

Hit this again. I've had issues w/ prompt-toolkit in prev projects, was not a good feeling to see it here ;-)

@dkorobchenko-nv

This comment has been minimized.

Copy link

@dkorobchenko-nv dkorobchenko-nv commented Jul 30, 2019

ipython 7.7.0 has requirement prompt-toolkit<2.1.0,>=2.0.0
jupyter-console 5.2.0 has requirement prompt_toolkit<2.0.0,>=1.0.0

@mahdi-malv

This comment has been minimized.

Copy link

@mahdi-malv mahdi-malv commented Aug 25, 2019

For iPython version 7.7.0:

 pip uninstall prompt-toolkit
 pip install prompt-toolkit==2.0.9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
9 participants
You can’t perform that action at this time.