I\'ve installed colorama for python. I\'ve imported the module as follows:
import colorama
from colorama import init
init()
from colorama import Fore, Back,
I know I'm late, but this will hopefully help anyone still looking for the answer.
Stating from Colorama's documentation on PyPI:
Colorama can be used happily in conjunction with existing ANSI libraries such as Termcolor
from colorama import init from termcolor import colored # use Colorama to make Termcolor work on Windows too init() # then use Termcolor for all colored text output print(colored('Hello, World!', 'green', 'on_red'))
This worked for me, on Anaconda Prompt (essentially cmd.exe
) on Windows 10 64-bit.
Colorama's native ANSI sequences don't seem to work for some reason. An external ANSI library (i.e. Termcolor) did the trick for me.