Search code examples
pythonrich

Python Rich: Emojis not showing


from rich import print
from rich.console import Console
console = Console()


#example 1
print("Hello, [bold magenta]World[/bold magenta]!", ":vampire:", locals())

#example 2
console = Console()
print("Hello, [bold magenta]World[/bold magenta]!", "😎")
console.print("Hello", "World!", style="bold red")

#example 3
print(f"I wonder what this looks like 1 + 1 = {1 + 1}")
print({"a": [1, 2, 3], "b" : {"c" : 1}})


#example 4
console.print("This is some text.")
console.print("This is some text.", style="bold")
console.print("This is some text.", style="bold underline")
console.print("This is some text.", style="bold underline red")
console.print("This is some text.", style="bold underline red on black")
 
#example 5
console.print(":thumbs_up: File downloaded!")

input("")

so when i run it i get i Am not getting what is the error please help i am mostly confused with these topics so i dont know what is the error

enter image description here


Solution

  • The classic windows console doesn't have good support for emoji. If you install the new Windows Terminal you will find your emojis will appear as expected.