0

I'am trying to reproduce the Docker Installation of the Book "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) for opening the Jupyter Notebook, but I got ERRORS. Before I installed Python3 and pip3 (couldn't install just Python and pip).

Got this multiple inside the running code:

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.

(cannot fix the problem with the link inside)

and this ERROR at the End of Code:

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

Maybe somebody can help me? thx a lot!

MEDZ
  • 2,227
  • 2
  • 14
  • 18
Chrissi
  • 95
  • 1
  • 1
  • 10
  • On which command where did you get this error? – Tarun Lalwani May 13 '20 at 09:28
  • After running docker and puting in the command: repo2docker https://github.com/mikhailklassen/Mining-the-Social-Web-3rd-Edition – Chrissi May 13 '20 at 09:55
  • Make sure you install it using `pip3 install jupyter-repo2docker`? – Tarun Lalwani May 13 '20 at 10:56
  • It's unable to uninstall tornado==6.0.2 which is specified in [binder/requirements.tx](https://github.com/mikhailklassen/Mining-the-Social-Web-3rd-Edition/blob/master/binder/requirements.txt). First try to uninstall through: `pip uninstall tornado` If it doesn't works, try to remove it manually from site-packages. If none works, my recommendation would be to create a virtualenv and do the Python installation step inside virtualenv, basically the 'POST Docker' step. – Saurabh May 14 '20 at 10:54
  • Thanks for your answers! @Turan Lalwani: `pip3 install jupyter-repo2docker` seems to work, but I got the same Warning inside the code `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.` – Chrissi May 19 '20 at 07:49
  • @Saurabh `pip uninstall tornado` seems to work in the first moment: `ubu20_admin@News3819:~$ pip3 uninstall tornado Found existing installation: tornado 6.0.4 Uninstalling tornado-6.0.4: Would remove: /home/ubu20_admin/.local/lib/python3.8/site-packages/tornado-6.0.4.dist-info/* /home/ubu20_admin/.local/lib/python3.8/site-packages/tornado/* Proceed (y/n)? y Successfully uninstalled tornado-6.0.4` – Chrissi May 19 '20 at 07:55
  • but finally I got at the end of code: `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.` I just want to open the jupyter notebook from `repo2docker https://github.com/mikhailklassen/Mining-the-Social-Web-3rd-Edition` Is there another way too or does this mean, that I cannot use Docker in the right way via Terminal? – Chrissi May 19 '20 at 07:55

3 Answers3

1

Solution to your issue, don't use docker as it won't be able to uninstall the tornado package which is a pure distutil package due to pip install instructions. Use below solution:

I work on virtual envs, and would recommend you to do the same.

Clone the repo

navigate to /binder

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

navigate to /notebooks Execute jupyter notebook

Saurabh
  • 528
  • 2
  • 8
  • For this: execute `pip install --ignore-installed -r requirements.txt` I got: `Defaulting to user installation because normal site-packages is not writeable ERROR: Could not open requirements file: [Errno 2] Datei oder Verzeichnis nicht gefunden: 'requirements.txt'` – Chrissi May 19 '20 at 09:58
  • For navigate to /notebooks Execute `jupyter notebook` I got: `Traceback (most recent call last): File "/home/ubu20_admin/.local/bin/jupyter-notebook", line 5, in from notebook.notebookapp import main File "/home/ubu20_admin/.local/lib/python3.8/site-packages/notebook/__init__.py", line 25, in from .nbextensions import install_nbextension` – Chrissi May 19 '20 at 10:00
  • `File "/home/ubu20_admin/.local/lib/python3.8/site-packages/notebook/nbextensions.py", line 605, in from .extensions import ( File "/home/ubu20_admin/.local/lib/python3.8/site-packages/notebook/extensions.py", line 8, in from tornado.log import LogFormatter ModuleNotFoundError: No module named 'tornado'` – Chrissi May 19 '20 at 10:00
  • didn't know what exactly I had done, but now it works and I can open the jupyter notebook from terminal (I guess I just installed tornado with `pip3 install tornado --user --ignore-installed` – Chrissi May 19 '20 at 11:49
  • Good to know :) – Saurabh May 19 '20 at 14:17
  • Can you mark this as answered if it has solved your query? Thanks. – Saurabh Jun 12 '20 at 17:55
0

From the answer: https://stackoverflow.com/a/67134670/1290868

For me it was this line in requirements.txt;

...
jupyterlab>=1.0
....

removed the version part (">=1.0") and it worked;

...
jupyterlab
....
myuce
  • 1,321
  • 1
  • 19
  • 29
0

I was tying to update jupyter notebook / jupyterlab and had issues with terminado, not sure what it is. Even after uninstalling it, it was avl (not sure why). Hence, I uninstalled jupyterlab and installed it back again.

rishi jain
  • 1,524
  • 1
  • 19
  • 26