blokeley blokeley - 9 months ago 114
Bash Question

pandas printing `tput: unknown terminal "emacs"`

I'm using

installed via Anaconda on Windows 10.

I run an IPython terminal inside an emacs inferior Python shell.

Every time I print a
to the terminal, I get an error message
tput: unknown terminal "emacs"

The error message is then followed by the correct output so I wish I could just turn off the error message.

It seems similar to this question. For what it's worth, I do have Git/bin on my PATH environment variable but I don't know how this would affect anything.

Any advice would be much appreciated.


I ran into a similar problem while manipulating pandas.DataFrame in the debug perspective of Eclipse (Mars 2) under Windows 7.

When trying to examine the content of the DataFrame the console would output :

tput: unknown terminal "emacs"

while the value would display (pending), and the debug session would freeze forever.

I identified that the tput command was indeed a unix command shipped in by cygwing :

D:\smouton>where tput

The workaround I set up is to modify the PATH variable before launching Eclipse. This is conveniently done by launching the following batch file instead of Eclipse executable :

REM Remove reference to "unixy" stuff before calling eclipse
REM This avoids 'tput: unknown terminal "emacs"' error when manipulating pandas dataframe
SET PATH=%PATH:;C:\MinGW\bin;d:\smouton\cygwin64\bin;=;%
REM launch eclipse
START "" "C:\Program Files (x86)\Eclipse\eclipse.exe"

This file simply removes C:\MinGW\bin and d:\smouton\cygwin64\bin from PATH, then starts eclipse.

I suppose a similar workaround can solve the OP's issue with IPython as well.