Python rich - 无法打印文本样式,只能打印颜色

Python rich - Can't print text styles, only colors

问题是我无法打印任何文本样式。这是我的代码,我认为它没有错误:

from rich.console import Console

console = Console(highlight=False)

console.print("Test print")
console.print("[green]Test print (green)")
console.print("[bold]Test print (bold)")
console.print("[bold underline]Test print (bold underline)")

input()

这是我在 运行 脚本之后得到的:https://i.stack.imgur.com/1SXwN.png

这就是我在 cmd 中 运行 python -m rich 时得到的结果:https://i.stack.imgur.com/68k3p.png

我该怎么办?我在 Windows 终端(来自 MS Store)中尝试过,我得到了更多的颜色和所有文本样式,但我无法将 Windows 终端设置为默认值(我有 Windows 10,不是 Windows 11).

经典Windows终端不支持任何文本样式,只有16种颜色。

使用 python 现状。可以使用pip安装

quo