jupyter icon indicating copy to clipboard operation
jupyter copied to clipboard

prompt-toolkit requirement conflict

Open drasmuss opened this issue 6 years ago • 10 comments

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 avatar Sep 28 '18 13:09 drasmuss

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.

nkarki avatar Sep 30 '18 14:09 nkarki

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

pip uninstall ipykernel pip install ipykernel==4.8.0

raunaks13 avatar Sep 30 '18 19:09 raunaks13

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.

saubhik avatar Oct 01 '18 09:10 saubhik

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

nkarki avatar Oct 01 '18 09:10 nkarki

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

bingblackbean avatar Oct 02 '18 13:10 bingblackbean

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

kubra1tas avatar May 05 '19 18:05 kubra1tas

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

lmeyerov avatar Jul 25 '19 15:07 lmeyerov

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

dkorobchenko avatar Jul 30 '19 16:07 dkorobchenko

For iPython version 7.7.0:

 pip uninstall prompt-toolkit
 pip install prompt-toolkit==2.0.9

mahdi-malv avatar Aug 25 '19 07:08 mahdi-malv

How i got rid of the dependency issue is -- first i upgraded my notebook with

python -m pip install notebook --upgrade

this gave me a conflict which said jupyter-console 5.2.0 is incompatible with promt-toolkit<2.0.0, >=1.0.0 and while upgrading my notebook prompt-toolkit 3.0.3 got installed, the issue here is due to the older version (i think) of jupyter-console, so when i ran the command

python -m pip install jupyter-console --upgrade,

this installed jupyter_console-6.1.0 which resolved the error

I tested it by uninstalling ipython and again installing it, no errors were given. Hope this helps.

PRITISH009 avatar Feb 05 '20 05:02 PRITISH009

Hey there, I'm going through old issues and it seems to me that it makes sense to close this one.

Thanks everyone and happy hacking! :bowtie:

ivanov avatar Dec 16 '23 04:12 ivanov

I have unsubscribed this email but still keep getting it. Please help unsubscribe!

Thanks

Lufeng Yuan

On Dec 15, 2023, at 23:09, Paul Ivanov @.***> wrote:



Closed #370https://github.com/jupyter/jupyter/issues/370 as completed.

— Reply to this email directly, view it on GitHubhttps://github.com/jupyter/jupyter/issues/370#event-11264973004, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJDGVNFU5FQAWNVEHDP2PU3YJUNFZAVCNFSM4FXZ32B2U5DIOJSWCZC7NNSXTWQAEJEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW4OZRGEZDMNBZG4ZTAMBU. You are receiving this because you are subscribed to this thread.Message ID: @.***>

LufengYuan avatar Dec 16 '23 05:12 LufengYuan