我尝试按照此处的说明安装 jupyter 扩展。
指令中名为“安装python包”的第一步已成功。但是第二个名为“安装 javascript 和 css 文件”的文件失败了。我jupyter contrib nbextension install --user
按照指示执行,但出现错误。
错误说:pkg_resources.DistributionNotFound: The 'terminado>=0.8.1' distribution was not found and is required by notebook
。(显示的所有回溯如下。)但我确认我已经安装了'terminado' v0.8.2 包,它是通过 pip 安装的。
我该如何处理这个问题?问题仅仅是 jupyter 命令不知道“终端”的安装位置吗?还是问题更严重?
所有的错误信息如下:
Traceback (most recent call last):
File "/usr/local/bin/jupyter-contrib", line 5, in <module>
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 3241, in <module>
@_call_aside
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 3225, in _call_aside
f(*args, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 3254, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 583, in _build_master
ws.require(__requires__)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 786, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'terminado>=0.8.1' distribution was not found and is required by notebook
我正在使用 macOS Catalina(但同样的问题出现在 Mojave。