CITGuru / PyInquirer

A Python module for common interactive command line user interfaces
MIT License
1.91k stars 235 forks source link

Is PyInquirer not incompatible with Jupyter notebook? #153

Closed info-rchitect closed 3 years ago

info-rchitect commented 3 years ago

Hi,

I love your library so I hope this is user error. Here is what I get when I try to run a Jupyter notebook that uses PyInquirer for all of the user selections.

pyinquirer 1.0.3 requires prompt_toolkit==1.0.14, but you have prompt-toolkit 3.0.16 which is incompatible.

It seems that ipykernal is the complaining module:

Requirement already satisfied: decorator in c:\users\bcaqueli\appdata\local\programs\python\python38\lib\site-packages (from ipython>=5.0.0->ipykernel) (4.4.2)        
Collecting prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0
  Using cached prompt_toolkit-3.0.16-py3-none-any.whl (366 kB)

thx in advance for any help

pohlt commented 3 years ago

PyInquirer depends on a prompt_toolkit version which is almost 4 years old now. IPython however expects prompt_toolkit to be a more reasonable version 3+. Since it's unlikely that IPython goes back to a four year old version, I think it's pyinquirer's move now. ;-)

info-rchitect commented 3 years ago

@pohlt Yeah I should have closed this as I found out the same thing as you did. I switched to questionary but even that won't work. To query the user in Jupyter Notebook you need to rely mostly on ipywidgets.