Skip to content

Cannot read termcap database #125

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

Closed
kingbuzzman opened this issue May 3, 2022 · 3 comments
Closed

Cannot read termcap database #125

kingbuzzman opened this issue May 3, 2022 · 3 comments

Comments

@kingbuzzman
Copy link

kingbuzzman commented May 3, 2022

Just installed cpython-3.10.4+20220502-x86_64-unknown-linux-gnu-pgo+lto-full.tar.zst and when I run the executable /python/install/bin/python3 I get an odd warning/error:

Python 3.10.4 (main, May  3 2022, 04:26:08) [Clang 14.0.3 ] on linux
Type "help", "copyright", "credits" or "license" for more information.
Cannot read termcap database;
using dumb terminal settings.
>>>

Cannot read termcap database; I looked around for a solution, nothing stands out; I figured I'd ask here.

I've installed ncurses, readline, random libs just to see if the warning goes away.. nothing.

@indygreg
Copy link
Collaborator

indygreg commented May 5, 2022

This is likely the quirk documented in https://python-build-standalone.readthedocs.io/en/latest/quirks.html#backspace-key-doesn-t-work-in-python-repl.

There's not much we can do about this aside from effectively injecting code into CPython that sniffs common filesystem paths for the terminfo database and sets an environment variable to force libedit/readline to pick up the dynamically discovered database. This is what the pyembed Rust crate does and is why the PyOxidizer binaries built using these Python distributions don't encounter the issue.

@sourcedelica
Copy link

Interestingly I get the message but the backspace key works. Either way setting the suggested environment variables fixed the error message.

@indygreg
Copy link
Collaborator

Since I wrote my last comment 11 days ago, I announced PyOxy: https://gregoryszorc.com/blog/2022/05/10/announcing-the-pyoxy-python-runner/.

PyOxy has the run-time workaround for locating the terminfo database. So you may find PyOxy to have more desirable behavior out-of-the-box than the Python distributions produced by this project.

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