Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

This example is from an older cluster/version of OnDemand, but the principle still applies.

Info

A The fakeusername user had the following error:

Expand
titleFull Trace:
Code Block
[nvlastos@blog2 d248fc5c-162c-42c6-b96d-e2ea46cbf3c1]$ cat output.log
...
TIMING - Starting jupyter at: Fri Jul 26 13:20:12 MDT 2024
Traceback (most recent call last):
  File "/apps/s/jupyterlab/miniconda3/bin/jupyter-lab", line 6, in <module>
    from jupyterlab.labapp import main
  File "/apps/s/jupyterlab/miniconda3/lib/python3.9/site-packages/jupyterlab/__init__.py", line 7, in <module>
    from .labapp import LabApp
  File "/apps/s/jupyterlab/miniconda3/lib/python3.9/site-packages/jupyterlab/labapp.py", line 18, in <module>
    from jupyterlab_server import WORKSPACE_EXTENSION, LabServerApp, slugify
  File "/apps/s/jupyterlab/miniconda3/lib/python3.9/site-packages/jupyterlab_server/__init__.py", line 4, in <module>
    from .app import LabServerApp
  File "/apps/s/jupyterlab/miniconda3/lib/python3.9/site-packages/jupyterlab_server/app.py", line 11, in <module>
    from .handlers import LabConfig, add_handlers
  File "/apps/s/jupyterlab/miniconda3/lib/python3.9/site-packages/jupyterlab_server/handlers.py", line 19, in <module>
    from .translations_handler import TranslationsHandler
  File "/apps/s/jupyterlab/miniconda3/lib/python3.9/site-packages/jupyterlab_server/translations_handler.py", line 16, in <module>
    from .translation_utils import get_language_pack, get_language_packs, is_valid_locale, translator
  File "/apps/s/jupyterlab/miniconda3/lib/python3.9/site-packages/jupyterlab_server/translation_utils.py", line 15, in <module>
    import pkg_resources
  File "/home/
nvlastos
fakeusername/.local/lib/python3.9/site-packages/pkg_resources/__init__.py", line 96, in <module>
    from jaraco.text import (
  File "/home/fakeusername/.local/lib/python3.9/site-packages/setuptools/_vendor/jaraco/text/__init__.py", line 12, in <module>
    from jaraco.context import ExceptionTrap
  File "/home/fakeusername/.local/lib/python3.9/site-packages/setuptools/_vendor/jaraco/context.py", line 17, in <module>
    from backports import tarfile
ImportError: cannot import name 'tarfile' from 'backports' (/apps/s/jupyterlab/miniconda3/lib/python3.9/site-packages/backports/__init__.py)
Timed out waiting for Jupyter Notebook server to open port 40276!
TIMING - Wait ended at: Fri Jul 26 13:21:19 MDT 2024
Cleaning up...

Prev

...

Note

Two things to notice.

First the ImportError caused by a dependency issue: ImportError: cannot import name 'tarfile' from 'backports'

Second, the location of the package, that has been installed, where this is originating from: /home/fakeusername/.local/lib/python3.9/site-packages/pkg_resources

Info

Unfortunately, the simplest way to resolve is to remove this folder.

How this effects your environment/pipeline you will have to figure out.

Unfortunately, the more complicated you try and make a single environment, the more likely this is too occur.

Suggestion: Maybe consider creating a separate Conda environment/kernel.

...

...