jupyter
jupyter copied to clipboard
prompt-toolkit requirement conflict
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
.
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.
The problem is with the recent ipykernel update. A temporary fix could be:
pip uninstall ipykernel
pip install ipykernel==4.8.0
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
.
Both @raunaks13 and @saubhik 's solutions work provided you remove jupyter.
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
I first downloaded 1.0.15 and then I was able to download 2.0.9. Maybe you can try that, too.
Hit this again. I've had issues w/ prompt-toolkit in prev projects, was not a good feeling to see it here ;-)
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
For iPython version 7.7.0
:
pip uninstall prompt-toolkit
pip install prompt-toolkit==2.0.9
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.
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:
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: @.***>