Can't install SelectMenu

180 views Asked by At
Collecting SelectMenu
  Using cached SelectMenu-1.0.0b2.tar.gz (3.4 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  error: subprocess-exited-with-error

  python setup.py egg_info did not run successfully.
  exit code: 1

  [10 lines of output]
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "C:\Users\user\AppData\Local\Temp\pip-install-f60sp66w\selectmenu_815b28a3de7f43b983f0ed0a1ecdd478\setup.py", line 5, in <module>
      from selectmenu import __author__, __version__
    File "C:\Users\user\AppData\Local\Temp\pip-install-f60sp66w\selectmenu_815b28a3de7f43b983f0ed0a1ecdd478\selectmenu\__init__.py", line 4, in <module>
      from selectmenu.core import SelectMenu
    File "C:\Users\user\AppData\Local\Temp\pip-install-f60sp66w\selectmenu_815b28a3de7f43b983f0ed0a1ecdd478\selectmenu\core.py", line 6, in <module>
      from prompt_toolkit.token import Token
  ImportError: cannot import name 'Token' from 'prompt_toolkit.token' (C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\prompt_toolkit\token.py)
  [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

Getting this error while trying to install a requirements folder. I have no idea what to do so far

1

There are 1 answers

0
Melvin Loos On

I think I ran into a similar issue, it seems like this package is only available for python2 and I am running python3. Check if you have the same issue.

Source: https://pypi.org/project/SelectMenu/

EDIT: you might be able to make it run with python3 with the following hack at: https://github.com/alice1017/SelectMenu/issues/4#issuecomment-773841255

Downgrade prompt_toolkit to 1.0.14

pip install 'prompt_toolkit==1.0.14'