When I start a python3 shell on my machine, I get the following warnings:

$ python3
Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 18:10:19)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
readline: /etc/inputrc: line 18: term: unknown variable name
readline: /etc/inputrc: line 18: term: unknown variable name

I am using an Anaconda distribution. When using the default python executable, I do not get any warning.

The 18th line of /etc/inputrc is:

$ cat /etc/inputrc | sed -n 18p
set term xy

My system versions:

$ uname -a
Linux tlelectra01 3.0.13-0.27-default #1 SMP Wed Feb 15 13:33:49 UTC 2012 (d73692b) x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/SuSE-release
SUSE Linux Enterprise Server 11 (x86_64)

There is already a bug report for this apparently, but without any indication on how to solve this...

How can I solve this? I only have user privileges on this machine.

1 Answer 1


Indeed, it looks like SuSE ships an /etc/inputrc that has this set term in it which doesn't seem to be a valid variable in readline, at least from the documentation and the man page, both of which list the existing variables and none of them lists "term" as a valid one...

The file .inputrc in your home directory overrides the global /etc/inputrc, when it exists. So one option is to copy /etc/inputrc into ~/.inputrc for your user, then edit it and delete line 18. This should hopefully solve the issue.

If you already have a ~/.inputrc, check if it has a $include /etc/inputrc in it. In that case, replace that line with the contents of /etc/inputrc and delete the line that sets the invalid "term" variable. That should fix it.

  • Thanks, I did a copy of /etc/inputrc to ~/.inputrc and it worked. I had to start a new shell for the change to be taken into account though.
    – Holt
    Commented Mar 27, 2018 at 14:42
  • Do you think this can be fixed with a specific patch to readline on suse when building readline and python3 from source?
    – Fanchi
    Commented Aug 6, 2018 at 9:18
  • @Fanchi I don't know much about SuSE, but you can check the source RPM for bash which seems to be where SuSE ships readline, and look inside to see what kind of patches they ship for it... (Note, URL for package came from search in pkgs.org, so not sure it's very accurate either.) Another option is for you to install RPM for readline-devel and compile your custom Python with it, instead of building readline from source yourself too. Good luck!
    – filbranden
    Commented Aug 6, 2018 at 16:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .