Published on

[PyCharm] ‘tput unknown terminal “emacs”’ appears when using debugging console w/ iPython

Reported issues

In debugging console (w/ iPython), tput unknown terminal 'emacs' is repeatedly appearing.

Possible cause

  • In pycharm installation dir./helpers/pydev/_pydev_bundle/pydev_ipython_console.py, $TERM is hard-coded
    • line6: os.environ['TERM'] = 'emacs' #to use proper page_more() for paging
    • This overwrites your $TERM setting if you use iPython console when debugging.
    • If your env doesn't have terminfo for emacs, then it fails.

Workaround

って内容を PyCharm の Issue Tracker に書いた. 少しは役に立つといいけど.