[GH-ISSUE #5620] ImportError: cannot import name 'tarfile' from 'backports' after update via Pip to 0.3.23 #52723

Closed
opened 2026-05-05 13:49:43 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @qiulang on GitHub (Sep 23, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/5620

Bug Report

I updated to the latest 0.3.23 via Pip

pip install -U -v open-webui
...
Successfully installed authlib-1.3.1 bitarray-2.9.2 colbert-ai-0.2.21 einops-0.8.0 environs-9.5.0 git-python-1.0.3 gitdb-4.0.11 gitpython-3.1.43 milvus-lite-2.4.10 ninja-1.11.1.1 open-webui-0.3.23 pymilvus-2.4.6 setuptools-75.1.0 smmap-5.0.1

Environment

  • Open WebUI Version: v0.3.23

  • Ollama (if applicable): v0.3.10

  • Operating System: macOS 14.6.1

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Description

open-webui serve


 /Users/langqiu/anaconda3/lib/python3.11/site-packages/setuptools/_vendor/jaraco/context.py:17 in │
│ <module>                                                                                         │
│                                                                                                  │
│    14                                                                                            │
│    15                                                                                            │
│    16 if sys.version_info < (3, 12):                                                             │
│ ❱  17 │   from backports import tarfile                                                          │
│    18 else:                                                                                      │
│    19 │   import tarfile                                                                         │
│    20                                                                                            │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ annotations = _Feature((3, 7, 0, 'beta', 1), None, 16777216)                                 │ │
│ │  contextlib = <module 'contextlib' from                                                      │ │
│ │               '/Users/langqiu/anaconda3/lib/python3.11/contextlib.py'>                       │ │
│ │   functools = <module 'functools' from                                                       │ │
│ │               '/Users/langqiu/anaconda3/lib/python3.11/functools.py'>                        │ │
│ │    Iterator = typing.Iterator                                                                │ │
│ │    operator = <module 'operator' from '/Users/langqiu/anaconda3/lib/python3.11/operator.py'> │ │
│ │          os = <module 'os' (frozen)>                                                         │ │
│ │      shutil = <module 'shutil' from '/Users/langqiu/anaconda3/lib/python3.11/shutil.py'>     │ │
│ │  subprocess = <module 'subprocess' from                                                      │ │
│ │               '/Users/langqiu/anaconda3/lib/python3.11/subprocess.py'>                       │ │
│ │         sys = <module 'sys' (built-in)>                                                      │ │
│ │    tempfile = <module 'tempfile' from '/Users/langqiu/anaconda3/lib/python3.11/tempfile.py'> │ │
│ │      urllib = <module 'urllib' from                                                          │ │
│ │               '/Users/langqiu/anaconda3/lib/python3.11/urllib/__init__.py'>                  │ │
│ │    warnings = <module 'warnings' from '/Users/langqiu/anaconda3/lib/python3.11/warnings.py'> │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ImportError: cannot import name 'tarfile' from 'backports' (/Users/langqiu/anaconda3/lib/python3.11/site-packages/backports/__init__.py)

screenshot of the error

Originally created by @qiulang on GitHub (Sep 23, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/5620 # Bug Report I updated to the latest 0.3.23 via Pip ``` pip install -U -v open-webui ... Successfully installed authlib-1.3.1 bitarray-2.9.2 colbert-ai-0.2.21 einops-0.8.0 environs-9.5.0 git-python-1.0.3 gitdb-4.0.11 gitpython-3.1.43 milvus-lite-2.4.10 ninja-1.11.1.1 open-webui-0.3.23 pymilvus-2.4.6 setuptools-75.1.0 smmap-5.0.1 ``` ## Environment - **Open WebUI Version:** v0.3.23 - **Ollama (if applicable):** v0.3.10 - **Operating System:** macOS 14.6.1 **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I am on the latest version of both Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Description ``` open-webui serve /Users/langqiu/anaconda3/lib/python3.11/site-packages/setuptools/_vendor/jaraco/context.py:17 in │ │ <module> │ │ │ │ 14 │ │ 15 │ │ 16 if sys.version_info < (3, 12): │ │ ❱ 17 │ from backports import tarfile │ │ 18 else: │ │ 19 │ import tarfile │ │ 20 │ │ │ │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ │ │ annotations = _Feature((3, 7, 0, 'beta', 1), None, 16777216) │ │ │ │ contextlib = <module 'contextlib' from │ │ │ │ '/Users/langqiu/anaconda3/lib/python3.11/contextlib.py'> │ │ │ │ functools = <module 'functools' from │ │ │ │ '/Users/langqiu/anaconda3/lib/python3.11/functools.py'> │ │ │ │ Iterator = typing.Iterator │ │ │ │ operator = <module 'operator' from '/Users/langqiu/anaconda3/lib/python3.11/operator.py'> │ │ │ │ os = <module 'os' (frozen)> │ │ │ │ shutil = <module 'shutil' from '/Users/langqiu/anaconda3/lib/python3.11/shutil.py'> │ │ │ │ subprocess = <module 'subprocess' from │ │ │ │ '/Users/langqiu/anaconda3/lib/python3.11/subprocess.py'> │ │ │ │ sys = <module 'sys' (built-in)> │ │ │ │ tempfile = <module 'tempfile' from '/Users/langqiu/anaconda3/lib/python3.11/tempfile.py'> │ │ │ │ urllib = <module 'urllib' from │ │ │ │ '/Users/langqiu/anaconda3/lib/python3.11/urllib/__init__.py'> │ │ │ │ warnings = <module 'warnings' from '/Users/langqiu/anaconda3/lib/python3.11/warnings.py'> │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ ImportError: cannot import name 'tarfile' from 'backports' (/Users/langqiu/anaconda3/lib/python3.11/site-packages/backports/__init__.py) ``` ![screenshot of the error](https://github.com/user-attachments/assets/85b39285-f0c9-48fe-8598-f2f51bca5b00)
Author
Owner

@qiulang commented on GitHub (Sep 23, 2024):

I run conda update conda to update conda and the problem was fixed. But I don't know which package caused the problem

<!-- gh-comment-id:2367554506 --> @qiulang commented on GitHub (Sep 23, 2024): I run `conda update conda` to update conda and the problem was fixed. But I don't know which package caused the problem
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#52723