aegirhall / console-menu

A simple Python menu system for building terminal user interfaces.
MIT License
365 stars 58 forks source link

ImportError: cannot import name 'SelectionMenu' from 'consolemenu' #84

Closed GreyArea765 closed 1 year ago

GreyArea765 commented 1 year ago

I get the following error when trying to follow the example

ImportError: cannot import name 'SelectionMenu' from 'consolemenu'

Install with Pip and then interactively import:

$ pip install consolemenu
Defaulting to user installation because normal site-packages is not writeable
Collecting consolemenu
  Downloading ConsoleMenu-1.0.1.tar.gz (1.6 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: consolemenu
  Building wheel for consolemenu (setup.py) ... done
  Created wheel for consolemenu: filename=ConsoleMenu-1.0.1-py3-none-any.whl size=2300 sha256=85f89c71ee0f2a5e6f54eed09a1116fafd09605801cef513592820294fa17cf8
  Stored in directory: /home/mattb/.cache/pip/wheels/e7/40/e7/24b51c7416bf14019e8ba620d42d6f1bf3034643261cfa9f64
Successfully built consolemenu
Installing collected packages: consolemenu
Successfully installed consolemenu-1.0.1

$ python3
Python 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from consolemenu import SelectionMenu
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'SelectionMenu' from 'consolemenu' (/home/mattb/.local/lib/python3.10/site-packages/consolemenu/__init__.py)
aegirhall commented 1 year ago

Hi @GreyArea765,

Looks like you installed a different package. This package is "console-menu", not consolemenu.

Hope that helps. Thanks!

GreyArea765 commented 1 year ago

Oops, my bad - sorry!