[pypy-issue] Issue #2970: pyrepl._minimal_curses: "ImportError: curses library not found": should look for ncursesw also (pypy/pypy)

Daniel Hahler issues-reply at bitbucket.org
Sun Mar 10 14:59:41 EDT 2019


New issue 2970: pyrepl._minimal_curses: "ImportError: curses library not found": should look for ncursesw also
https://bitbucket.org/pypy/pypy/issues/2970/pyrepl_minimal_curses-importerror-curses

Daniel Hahler:

```
Python 3.6.1 (dab365a465140aa79a5f3ba4db784c4af4d5c195, Feb 10 2019, 01:16:39)
[PyPy 7.0.0-alpha0 with GCC 8.2.1 20181127] on linux
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``all we need is a native Prolog
machine''
>>>> from pyrepl import _minimal_curses
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "…/Vcs/pyrepl-git/pyrepl/_minimal_curses.py", line 27, in <module>
    _clibpath = _find_clib()
  File "…/Vcs/pyrepl-git/pyrepl/_minimal_curses.py", line 25, in _find_clib
    raise ImportError("curses library not found")
ImportError: curses library not found
```

https://bitbucket.org/pypy/pyrepl/issues/19/does-not-find-curses-via-ctypes-on-arch

A patch is available in the apparently obsolete/unmaintained pyrepl repo:

```diff
diff -r 9401662c4e6c pyrepl/_minimal_curses.py
--- a/pyrepl/_minimal_curses.py Fri Dec 04 13:10:13 2015 +0000
+++ b/pyrepl/_minimal_curses.py Wed Aug 31 17:10:45 2016 +0200
@@ -17,7 +17,7 @@


 def _find_clib():
-    trylibs = ['ncurses', 'curses']
+    trylibs = ['ncursesw', 'ncurses', 'curses']

     for lib in trylibs:
         path = ctypes.util.find_library(lib)
```




More information about the pypy-issue mailing list