To make the ANSI colors used in termcolor work with the windows terminal, you'll need to also import/init colorama;

>>> from termcolor import *
>>> cprint('hello', 'red')
←[31mhello←[0m
>>> import colorama
>>> colorama.init()
>>> cprint('hello', 'red')
hello                                    <-- in red color
>>>
Answer from Joachim Isaksson on Stack Overflow
🌐
Reddit
reddit.com › r/learnpython › termcolor not working in python 3.6
r/learnpython on Reddit: TermColor not working in python 3.6
December 27, 2018 -

Hi, I used the pip install and pip3.6 install and successfully installed the module on both pythons.

When I run the print colorered on python 2 it works fine, but in 3.6 it doesn't

At first I thought it was a module issue, but the module is definitely installed.

Does this just not work on python 3.6?

Discussions

Problem with termcolor module
I have installed gpt-engineer and just tried running the sample program. This is what happens when I run the command. I have pip installed termcolor, even tried to install it directly into the pyth... More on github.com
🌐 github.com
July 17, 2023
python - Termcolor installs succesfully but doesn't seem to work properly - Stack Overflow
I started learning Python recently. I am trying to use the termcolor module. I installed it (latest version) successfully. But it doesn't seem to work on Pycharm. I apply the example code that is More on stackoverflow.com
🌐 stackoverflow.com
python - Why the termcolor doesn't work either the terminal supports coloring? - Stack Overflow
Here's what happens when I copy ... is not defined. Did you mean: 'termcolor'? that's why its important to be correct when asking for help. ... How exactly are you running the program? Are you running it directly from the terminal, or are you using a GUI environment such as VS Code? ... I upgraded to powershell to 7.5.1 and here is a demo of it working correctly ... More on stackoverflow.com
🌐 stackoverflow.com
TERMCOLOR - no color in run output
Try what is suggested here: https://stackoverflow.com/a/293633 EDIT: to be clear, try to add this before the print: os.system('color') Note that you will also need to import os EDIT2: what happens if you take the colored(…) out of the f-string? More on reddit.com
🌐 r/pycharm
2
3
April 18, 2023
🌐
Stack Overflow
stackoverflow.com › questions › tagged › termcolor
Newest 'termcolor' Questions - Stack Overflow
I have python 3.8 but keep getting the error message above when I try importing 'colored' from the termcolor library. What should I try? Thank you. ... I'm trying to build my own version of Wordle, and I've gotten stuck here. This part of the code is meant to color the appropriate character green when it matches the position and letter of the secret ... ... Im trying to install tensorflow, using pip install tensorflow. I can install other packages but tensorflow is just not working. This is the error i get: C:\Users\sebas>python -m pip install ...
🌐
PyPI
pypi.org › project › termcolor
termcolor · PyPI
Finally, termcolor will attempt to detect whether the terminal supports colour.
🌐
GitHub
github.com › AntonOsika › gpt-engineer › issues › 542
Problem with termcolor module · Issue #542 · AntonOsika/gpt-engineer
July 17, 2023 - It will still nor run even though the termcolor module is installed · PS C:\Users\remei\gpt-engineer> python -m gpt_engineer.main example Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "C:\Users\remei\gpt-engineer\gpt_engineer\main.py", line 9, in from gpt_engineer.collect import collect_learnings File "C:\Users\remei\gpt-engineer\gpt_engineer\collect.py", line 5, in from gpt_engineer import steps File "C:\Users\remei\gpt-engineer\gpt_engineer\steps.py", line 9, in from termcolor import colored ModuleNotFoundError: No module named 'termcolor' PS C:\Users\remei\gpt-engineer> where python PS C:\Users\remei\gpt-engineer> cd..
🌐
Stack Overflow
stackoverflow.com › questions › 79595425 › why-the-termcolor-doesnt-work-either-the-terminal-supports-coloring
python - Why the termcolor doesn't work either the terminal supports coloring? - Stack Overflow
Here's what happens when I copy your code: Termcolor.cprint("hello world","green") Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'Termcolor' is not defined. Did you mean: 'termcolor'? that's why its important to be correct when asking for help. ... How exactly are you running the program? Are you running it directly from the terminal, or are you using a GUI environment such as VS Code? ... I upgraded to powershell to 7.5.1 and here is a demo of it working correctly with a one letter change, the "T" in "Termcolor" changed to "t".
🌐
Reddit
reddit.com › r/pycharm › termcolor - no color in run output
r/pycharm on Reddit: TERMCOLOR - no color in run output
April 18, 2023 -

As You can see run output is not rendering colors. I do not have this problem with VSC. Can anyone help me with this one? I tried "Emulate terminal in output in console" and i receive this: ←[32mtest test test test←[0m

No colors in "test test test test"
Find elsewhere
🌐
Python Forum
python-forum.io › thread-15353.html
colorama/termcolor not returning coloured lines
Code - from colorama import Fore, Back, Style print(Fore.RED + 'some red text') print(Back.GREEN + 'and with a green background') print(Style.DIM + 'and in dim text') print(Style.RESET_ALL) print('back to normal now')output - Output:[31msome red te...
🌐
JetBrains
youtrack.jetbrains.com › issue › PY-64466 › termcolor-is-not-working-on-PyCharm-2023.2.5
termcolor is not working on PyCharm 2023.2.5 : PY-64466
Our website uses some cookies and records your IP address for the purposes of accessibility, security, and managing your access to the telecommunication network. You can disable data collection and cookies by changing your browser settings, but it may affect how this website functions.
🌐
Stack Overflow
stackoverflow.com › questions › tagged › termcolor
Recently Active 'termcolor' Questions - Stack Overflow
I started learning Python recently. I am trying to use the termcolor module. I installed it (latest version) successfully. But it doesn't seem to work on Pycharm.
🌐
Team Treehouse
teamtreehouse.com › community › why-do-termcolor-and-colorama-not-print-color-in-my-local-setup
Why do Termcolor and Colorama not print color in my local setup? (Example) | Treehouse Community
April 14, 2015 - Hmm I just installed and used it in my local shell using python 2.7.9 using the same code you posted. Try running "pip install termcolor --update" to correct any error you may have in your install.
🌐
Stack Overflow
stackoverflow.com › questions › 46761797 › using-colored-from-termcolor-with-format-in-terminal-not-working
python - using colored from termcolor with .format in terminal not working - Stack Overflow
How can i modify this code to make it work? from termcolor import colored print(colored('|{:^21}||{:^20}||{:^20}||{:^20}||{ :^20}|'.format('name','Quiz','Midterm','Final','Average','red'))) ... from termcolor import colored, cprint cprint(colored('|{:^21}||{:^20}||{:^20}||{:^20}||{:^20}|' .format('name', 'Quiz', 'Midterm', 'Final', 'Average'), 'red')) The value "red" should be an argument of the colored function, not format.
🌐
Itsourcecode
itsourcecode.com › home › modulenotfounderror: no module named termcolor
Fix No Module Named termcolor (2026 Python)
July 12, 2026 - To fix this error, we need to install the termcolor module by executing the “pip install termcolor” command. Also read: Modulenotfounderror: No Module Named Requests ... Here are the different ways to install the term color.
Published: Sep 12, 2022
Version: 2.0.1