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

ncurses not found but existing on macOS #28

Closed
ghoffart opened this issue Dec 23, 2022 · 3 comments
Closed

ncurses not found but existing on macOS #28

ghoffart opened this issue Dec 23, 2022 · 3 comments

Comments

@ghoffart
Copy link

Installed via:
% pip3 install TUIFIManager --upgrade

Run as:
% tuifi

Got:

goetz@host ~ % tuifi
Traceback (most recent call last):
  File "/opt/homebrew/bin/tuifi", line 5, in <module>
    from TUIFIManager.__main__ import main
  File "/opt/homebrew/lib/python3.10/site-packages/TUIFIManager/__init__.py", line 9, in <module>
    from       .TUIMenu import    *
  File "/opt/homebrew/lib/python3.10/site-packages/TUIFIManager/TUIMenu.py", line 2, in <module>
    import unicurses
  File "/opt/homebrew/lib/python3.10/site-packages/unicurses/__init__.py", line 119, in <module>
    ncurses,panel = get_libncursesw_paths()
  File "/opt/homebrew/lib/python3.10/site-packages/unicurses/__init__.py", line 79, in get_libncursesw_paths
    raise Exception('NCursesNotFound: ' + msg)
Exception: NCursesNotFound: No version of shared-libraries of ncurses found on this system, please try `brew install ncurses` if this won't work please create an issue

goetz@host ~ % brew install ncurses
==> Auto-updated Homebrew!
[…]
Running `brew update --auto-update`...
[…]

Warning: ncurses 6.3 is already installed and up-to-date.
To reinstall 6.3, run:
  brew reinstall ncurses

goetz@host ~ % sw_vers
ProductName:		macOS
ProductVersion:		13.1
BuildVersion:		22C65

… on ARM64.

@GiorgosXou
Copy link
Owner

GiorgosXou commented Dec 24, 2022

Good News

Good news is that I've had a similar issue in TERMUX with the in-built from ctypes.util import find_library function and there is already a plan B in the todo list which i think it used to work with macOS too.

Bad News

Is that I don't have or use macOS, and I might need some help if the plan B won't work

Permanent Solution

As of now, until I push the new release you could try the steps below for a permanent solution:

@GiorgosXou
Copy link
Owner

could you run this command on your terminal and tell me what it prints:

python -c "from ctypes.util import find_library;lib_paths=[find_library('ncursesw'),find_library('panelw')];print(lib_paths)"

@sainishwanth
Copy link

Found the Issue.

In the unicurses library under init.py a call is being made to get_libncursesw_paths() which in turn calls find_library from ctypes.util

lib_paths = [find_library('ncursesw'),find_library('panelw')]

The packages are named ncurses and panel in MacOSX, not ncursesw and panelw

I have a made a pull request to fix this on ur unicurses library if you'd like to check it.

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

3 participants