没有支持的彩色终端库Python / Jupyter

时间:2017-04-17 01:30:39

标签: python windows tornado jupyter

我试图在我的Windows 7计算机上启动一个Jupyter Notebook服务器,但在输入后我仍然收到这个奇怪的,看似无法检测的错误:

jupyter notebook

进入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

这看起来更像是Windows问题,而不是Python问题。有人可以给我一些建议吗?我只需要启动我的笔记本电脑服务器。

4 个答案:

答案 0 :(得分:26)

我刚遇到同样的问题!正如Ben所说,显然是Tornado 4.5的错误

我解决了安装以前的软件包Tornado 4.4.3

的问题
pip install tornado==4.4.3

然后我在cmd.exe中运行Jupyter Notebook:

jupyter notebook

答案 1 :(得分:2)

您是否安装了colorama?如果您已安装colorama但未调用colorama.init(),则在刚刚发布的Tornado 4.5中看起来像是一个错误。

答案 2 :(得分:2)

禁用颜色: 在第112行的文件c:\python27\lib\site-packages\tornado\log.py中查找color=True并将其更改为color=False。 或者从this repository

安装适用于Windows的curses模块

答案 3 :(得分:1)

在更新Anaconda Python发行版时,Windows 10上的Python 2.7存在同样的jupyter问题。 为Tornado日志文件设置color = False有助于解决问题。