0

I am new to python and jupyter-notebook. I am trying to print something with colors and I was thinking of using the colored package.

I am working on Ubuntu 18.04 and the jupyter-notebook is open in google chrome.

I am trying this by doing:

from termcolor import colored

print(colored('hello', 'red'))
print(colored("hello red world", 'red'))

I tried to restart the kernel, I tried to restart the whole jupyter-notebook, and I also tried

However, I get the following enter image description here

Could you help me in understanding why it does not work?

desmond13
  • 2,913
  • 3
  • 29
  • 46
  • 1
    you should probably state your operating system and maybe also your shell – Walter Tross Sep 17 '20 at 21:08
  • 1
    to debug, try if [this solution](https://stackoverflow.com/a/60246996/1046007) works for you – Walter Tross Sep 17 '20 at 21:17
  • Thanks for the comment. I will try as soon as I will have access again to the notebook and update here. I added my OS And browser. I don't know what you mean by 'shell' – desmond13 Sep 18 '20 at 06:55

1 Answers1

0

That is odd. Make sure you the colored lib is installed on your PC. I just ran your code on my notebook it worked out fine.