SelectMenu
SelectMenu copied to clipboard
ImportError: cannot import name 'Token' from 'prompt_toolkit.token' (/usr/lib/python3/dist-packages/prompt_toolkit/token.py)
$ pip3 install SelectMenu
Collecting SelectMenu
Using cached SelectMenu-1.0.0b2.tar.gz (3.4 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2e5v4gfb/SelectMenu/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2e5v4gfb/SelectMenu/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-2e5v4gfb/SelectMenu/pip-egg-info
cwd: /tmp/pip-install-2e5v4gfb/SelectMenu/
Complete output (9 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-2e5v4gfb/SelectMenu/setup.py", line 5, in <module>
from selectmenu import __author__, __version__
File "/tmp/pip-install-2e5v4gfb/SelectMenu/selectmenu/__init__.py", line 4, in <module>
from selectmenu.core import SelectMenu
File "/tmp/pip-install-2e5v4gfb/SelectMenu/selectmenu/core.py", line 6, in <module>
from prompt_toolkit.token import Token
ImportError: cannot import name 'Token' from 'prompt_toolkit.token' (/usr/lib/python3/dist-packages/prompt_toolkit/token.py)
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
@sevku
I'm sorry, selectMenu doesn't support python3.
Thanks for your reply. I'm aware of that.
I got it to run on Python3 with downgrading prompt_toolkit to 1.0.14
pip install 'prompt_toolkit==1.0.14
This is not a permanent solution, but it shows that there is basically only one issue to be solved to make it compatible with Python 3.
Then again I see that's a pretty essential part. I might play around with it.
Yes I got it running too with that solution too
@sevku I'm sorry, selectMenu doesn't support python3.
Please Update selectmenu that supports python 3
Sorry I can't do that. I have no time and don't have the use for it.
just install prompt toolkit version 1.0.14 by typing : pip install prompt_toolkit==1.0.14 it will be solved