Some terminals like your second example and the Python IDLE shell don't support colour output, namely ANSI escape codes. Therefore, simply use a terminal that supports colours like your first option.
As suggested elsewhere, Colorama is a great Python package, but you may want to consider other, simpler options. In full disclosure, I'm the author of the Colorist package. Just write:
from colorist import blue
blue("Hello World")

Or if you want a little more control over the output, you can also do this:
from colorist import Color
print(f"Only {Color.BLUE}this part{Color.OFF} is in colour")
