-->

No supported color terminal library Python/Jupyter

2019-02-12 01:58发布

问题:

I'm trying to start a Jupyter Notebook server on my Windows 7 machine, but I keep getting this odd, seemingly unsearchable error after typing:

jupyter notebook

into cmd.exe

C:\Users\zfleeman>jupyter notebook
Traceback (most recent call last):
  File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "c:\python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Python27\Scripts\jupyter-notebook.EXE\__main__.py", line 9, in <modul
e>
  File "c:\python27\lib\site-packages\jupyter_core\application.py", line 267, in
 launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "c:\python27\lib\site-packages\traitlets\config\application.py", line 657
, in launch_instance
    app.initialize(argv)
  File "<decorator-gen-7>", line 2, in initialize
  File "c:\python27\lib\site-packages\traitlets\config\application.py", line 87,
 in catch_config_error
    return method(app, *args, **kwargs)
  File "c:\python27\lib\site-packages\notebook\notebookapp.py", line 1290, in in
itialize
    super(NotebookApp, self).initialize(argv)
  File "<decorator-gen-6>", line 2, in initialize
  File "c:\python27\lib\site-packages\traitlets\config\application.py", line 87,
 in catch_config_error
    return method(app, *args, **kwargs)
  File "c:\python27\lib\site-packages\jupyter_core\application.py", line 239, in
 initialize
    self.parse_command_line(argv)
  File "c:\python27\lib\site-packages\notebook\notebookapp.py", line 1007, in pa
rse_command_line
    super(NotebookApp, self).parse_command_line(argv)
  File "<decorator-gen-4>", line 2, in parse_command_line
  File "c:\python27\lib\site-packages\traitlets\config\application.py", line 87,
 in catch_config_error
    return method(app, *args, **kwargs)
  File "c:\python27\lib\site-packages\traitlets\config\application.py", line 536
, in parse_command_line
    flags=flags, log=self.log)
  File "c:\python27\lib\site-packages\traitlets\traitlets.py", line 556, in __ge
t__
    return self.get(obj, cls)
  File "c:\python27\lib\site-packages\traitlets\traitlets.py", line 535, in get
    value = self._validate(obj, dynamic_default())
  File "c:\python27\lib\site-packages\traitlets\config\application.py", line 226
, in _log_default
    _log_formatter = self._log_formatter_cls(fmt=self.log_format, datefmt=self.l
og_datefmt)
  File "c:\python27\lib\site-packages\tornado\log.py", line 154, in __init__
    raise RuntimeError("No supported color terminal library")
RuntimeError: No supported color terminal library

This looks like more of a Windows problem than a Python problem. Can somebody give me some advice? I just need to launch my Notebook server.

回答1:

I just had the same problem!. As Ben said, apparently is an error of Tornado 4.5

I solved installing the previous package, Tornado 4.4.3

pip install tornado==4.4.3

And then I just run the Jupyter Notebook in cmd.exe:

jupyter notebook


回答2:

Do you have colorama installed? This looks like an error in the just-released Tornado 4.5 if you have colorama installed but do not call colorama.init().



回答3:

Disable color: In file c:\python27\lib\site-packages\tornado\log.py on line 112 look for color=True and change it to color=False. Or install curses module for Windows from this repository



回答4:

Had the same jupyter problem for Python 2.7 on windows 10 upon updating the Anaconda Python distribution. setting color=False for Tornado log file helped solve the problem.