Docker Ubuntu 20.04 - 无法卸载 'terminado' 和 pip 问题

Docker Ubuntu 20.04 - Cannot uninstall 'terminado' and problems with pip

我正在尝试重现 Docker 书籍安装 "Mining the Social Web" (Russel/Klassen) on Ubuntu 20.04. I set up Docker and tried to create the Docker container from the respository directly (repo2docker https://github.com/mikhailklassen/Mining-the-Social-Web-3rd-Edition) 以打开 Jupyter Notebook,但出现错误。在我安装 Python3 和 pip3 之前(不能只安装 Python 和 pip)。

在 运行 代码中得到了这个倍数:

WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.

(无法解决里面link的问题)

代码末尾出现此错误:

ERROR: Cannot uninstall 'terminado'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
Removing intermediate container 71cfe8e913dd
The command '/bin/sh -c ${KERNEL_PYTHON_PREFIX}/bin/pip install --no-cache-dir -r "binder/requirements.txt"' returned a non-zero code:1

也许有人可以帮助我?非常感谢!

针对您的问题的解决方案,请勿使用 docker,因为根据 pip 安装说明,它将无法卸载纯 distutil 包的 tornado 包。使用以下解决方案:

我在虚拟环境上工作,建议你也这样做。

Clone the repo

navigate to /binder

execute pip install --ignore-installed -r requirements.txt

navigate to /notebooks Execute jupyter notebook

来自回答:

对我来说是 requirements.txt;

中的这一行
...
jupyterlab>=1.0
....

删除了版本部分(“>=1.0”)并且有效;

...
jupyterlab
....

我想更新 jupyter notebook / jupyterlab,但遇到了 terminado 的问题,不确定它是什么。即使在卸载它之后,它也是 avl(不知道为什么)。 因此,我卸载了 jupyterlab 并重新安装了它。