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

ImportError: cannot import name 'Token' from 'prompt_toolkit.token' (/usr/lib/python3/dist-packages/prompt_toolkit/token.py) #4

Open
sevku opened this issue Feb 4, 2021 · 5 comments

Comments

@sevku
Copy link

sevku commented Feb 4, 2021

$ 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.
@alice1017
Copy link
Owner

@sevku

I'm sorry, selectMenu doesn't support python3.

@sevku
Copy link
Author

sevku commented Feb 5, 2021

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.

@rickerp
Copy link
Contributor

rickerp commented Mar 20, 2021

Yes I got it running too with that solution too

@sevku
Copy link
Author

sevku commented Nov 18, 2021

@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.

@Cyberlight-official
Copy link

just install prompt toolkit version 1.0.14 by typing : pip install prompt_toolkit==1.0.14
it will be solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants