Skip to content
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

Unknown Terminal type using conda env (Windows 10 --> WSL) #2525

Open
pyeguy opened this issue Nov 8, 2017 · 9 comments

Comments

@pyeguy
Copy link

commented Nov 8, 2017

Getting some weird behavior using a conda environment in windows subsystem for linux.
If I enter the env (USING XONDA) and try to clear the screen i get an unknown terminal type error

cpye@DESKTOP-0IGRTG4                                                                                            [~/pydev]
$ $TERM
'xterm-256color'
cpye@DESKTOP-0IGRTG4                                                                                           [~/pydev]
$ conda activate macrolib
(macrolib) cpye@DESKTOP-0IGRTG4                                                                          [~/pydev]
$ clear
'xterm-256color': unknown terminal type.

but when i deactivate the env it works fine...

xonfig:

+------------------+---------------------+
| xonsh            | 0.5.12              |
| Git SHA          | 8941dfdd            |
| Commit Date      | Jun 7 16:04:39 2017 |
| Python           | 3.6.3               |
| PLY              | 3.9                 |
| have readline    | True                |
| prompt toolkit   | 1.0.15              |
| shell type       | prompt_toolkit      |
| pygments         | 2.2.0               |
| on posix         | True                |
| on linux         | True                |
| distro           | debian              |
| on darwin        | False               |
| on windows       | False               |
| on cygwin        | False               |
| is superuser     | False               |
| default encoding | utf-8               |
| xonsh encoding   | utf-8               |
| encoding errors  | surrogateescape     |
+------------------+---------------------+
@gforsyth

This comment has been minimized.

Copy link
Collaborator

commented Nov 8, 2017

Hey @pyeguy -- thanks for reporting.

Is there a difference in the output of which clear when the environment is activated or not?

@pyeguy

This comment has been minimized.

Copy link
Author

commented Nov 8, 2017

@gforsyth

yes there is:
no env:

$ which clear
/home/cpye/miniconda3/bin/clear

in env:

(macrolib) cpye@DESKTOP-0IGRTG4                                                            
$ which clear
/home/cpye/miniconda3/envs/macrolib/bin/clear
@pyeguy

This comment has been minimized.

Copy link
Author

commented Nov 8, 2017

also if i use /home/cpye/miniconda3/bin/clear while in the env it works and i get no error...

@gforsyth

This comment has been minimized.

Copy link
Collaborator

commented Nov 9, 2017

Can you try a which -a clear (without the env activated) and see if there's a WSL "native" version of clear built in? And if there is, can you try running that both in and out of the env?

@gforsyth

This comment has been minimized.

Copy link
Collaborator

commented Nov 9, 2017

Oh yeah, and what happens if you run /home/cpye/miniconda3/envs/macrolib/bin/clear when not in the environment?

@pyeguy

This comment has been minimized.

Copy link
Author

commented Nov 9, 2017

all good diagnostics!

which -a clear output inside env:

/home/cpye/miniconda3/envs/macrolib/bin/clear (from PATH element 0)
/home/cpye/miniconda3/bin/clear (from PATH element 3)
/usr/bin/clear (from PATH element 7)

which -a clear output outside env:

/home/cpye/miniconda3/bin/clear (from PATH element 2)
/usr/bin/clear (from PATH element 6)

/usr/bin/clear works inside and outside the env

/home/cpye/miniconda3/envs/macrolib/bin/clear fails inside and outside the env

@gforsyth

This comment has been minimized.

Copy link
Collaborator

commented Nov 12, 2017

Ok, I think this is a problem with anaconda?
Can you see if there is a terminfo file for xterm-256color in /home/cpye/miniconda3/envs/macrolib/share/terminfo/x/?
And if not, symlinking the one that I'm pretty sure exists in /home/cpye/miniconda3/share/terminfo/x/ to that location should fix this.
Not sure why the terminfos aren't making it through when you create a new environment...

@pyeguy

This comment has been minimized.

Copy link
Author

commented Dec 6, 2017

sorry for the delayed response, and sorry to dash your hypothesis, there is a xterm-256color in the /home/cpye/miniconda3/envs/macrolib/share/terminfo/x/ directory...

@gforsyth

This comment has been minimized.

Copy link
Collaborator

commented Dec 10, 2017

Ok, thanks @pyeguy. Can you try creating a new environment and confirming that clear malfunctions there, as well? I may be missing some setting in the activate function in xonda

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.