-vvv option).This is https://github.com/python-poetry/poetry/issues/548 which was said to be fixed in "the latest beta" at the time, but now appears to be broken with no beta being more recent than the latest released version (1.0.3).
Long story short, there are no colors displayed on windows with any of the command shells I tried except in ConEmu. The default cmd.exe, powershell.exe and the new Windows Terminal don't display colors.
Some screenshots:
Powershell in Windows Terminal:

Cmd in Windows Terminal:

cmd.exe:

Cmd in Cmder (based on ConEmu) - This works!:

Powershell in Cmder (based on ConEmu):

This last one can probably be considered working as well, the green text is likely due to the cmder config.
@sztomi Did you also noticed that in Cmder at least as soon as I hit $poetry shell that all colors disappear & emacs key binding on the shell is gone as well? Have you found a fix for that or should I put in as second bug list?
Plus, do you get different prompt? Mine is plain C:\Prj\MOA> instead of what I see with pyenv:
C:\Prj
位 v_awscli.bat
C:\Users\ny11559\.pyenv\pyenv-win\versions\aws_cli\Scripts\activate
C:\Prj
(aws_cli) 位
I know that this is supposed to be depreciated with PYENV_VIRTUALENV_DISABLE_PROMPT=1, but I will likely keep it as is.
Thanks,
I tried with poetry --ansi and it worked for me. Seems like some stdout coloring library disables ANSI output when detecting PowerShell, and that --ansi forces it.
Looks like using rich would solve this issue.
I can't display the ANSI color effect in Windows terminal either, I have to add the command line parameter --ansi every time I run it, can this option switch be added to the config without adding the parameter every time?
@myliyifei you could use an alias (sth. like alias poetry="poetry --ansi") as a workaround, but I don't know how to make aliases on windows though (or if it's even possible at all...)
@sztomi hi ,you can check the env, the poety need to get your "TERM"
echo $TERM
For TERM = cygwin , you need to add --ansi to focus color it.
For TERM = xterm, you are lucky.
I'm not clear the other values.
What is yours ?
here is my config.

@gaoming714 TERM is not set in native windows terminals, that's a unix thing.
I found the problem here. Poetry uses cleo which in turn uses clikit which in turn uses pastel. Where pastel doesn't support colours on Windows. The alternative is to use colorama, for colour.
Most helpful comment
I found the problem here. Poetry uses
cleowhich in turn usesclikitwhich in turn usespastel. Wherepasteldoesn't support colours on Windows. The alternative is to usecolorama, for colour.