1

I'm trying to get curses working in IDLE on a Fedora 33 installation. However, whenever I run

stdscr = curses.initscr()

I end up with the following error:

Traceback (most recent call last):
    stdscr = curses.initscr()
  File "/usr/local/lib/python3.9/curses/__init__.py", line 29, in initscr
    setupterm(term=_os.environ.get("TERM", "unknown"),
_curses.error: setupterm: could not find terminal

I tried to change my path variables by adding TERM and TERMINFO to .bashrc, so my .bashrc file looks like

# .bashrc
if [ -f /etc/bashrc ]; then
    . /etc/bashrc
fi
TERM=xterm-256color
TERMINFO=/bin/bash
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]
then
    PATH="$HOME/.local/bin:$HOME/bin:$PATH:$TERM/bin:$PATH:$TERMINFO/bin"
fi
export PATH

(comments were removed because they turn into headers) I'm not sure what else to try. Python was installed via the make command method described in the readme, and IDLE was installed via dnf.

Note: I found this Setupterm could not find terminal, in Python program using curses, but the user was on Mac and in an IDE, so many of the solutions did not apply, and editing environment variables didn't help.

KillerQuow
  • 37
  • 8

0 Answers0