diff --git a/sphinx/util/console.py b/sphinx/util/console.py index c2330102d..508d895fc 100644 --- a/sphinx/util/console.py +++ b/sphinx/util/console.py @@ -55,7 +55,12 @@ def color_terminal(): def nocolor(): - codes.clear() + # check if colorama is installed to support color on Windows + try: + import colorama + colorama.init() + except ImportError: + codes.clear() def coloron(): codes.update(_orig_codes)