Package Details: python-rembg 2.0.72-1

Git Clone URL: https://aur.archlinux.org/python-rembg.git (read-only, click to copy)
Package Base: python-rembg
Description: Rembg is a tool to remove images background
Upstream URL: https://github.com/danielgatis/rembg
Keywords: background-removal image-processing
Licenses: MIT
Submitter: Winux
Maintainer: None
Last Packager: Exorcism
Votes: 2
Popularity: 0.000238
First Submitted: 2024-08-05 09:01 (UTC)
Last Updated: 2026-02-15 20:52 (UTC)

Latest Comments

AutoUpdateBot commented on 2026-02-24 13:59 (UTC) (edited on 2026-02-24 14:01 (UTC) by AutoUpdateBot)

Build Status for python-rembg

Current version: 2.0.72-1 (up-to-date with upstream)

Build failure reason: Missing dependency - python-pymatting

CI run: https://github.com/arch4edu/aur-auto-update/actions/runs/22342719351

Maziar commented on 2025-12-27 16:55 (UTC)

m solution:

1. rembg Installation (Recommended Method)

Due to conflicts between system numba and llvmlite packages on Arch Linux, it is recommended to run rembg in an isolated virtual environment.

Prerequisites
  • uv (Fast Python package manager)
  • Python 3.12+
Installation Steps
# 1. Create Virtual Environment
uv venv
source .venv/bin/activate

# 2. Install rembg with compatible dependencies
# Force numba version to resolve Python 3.12 compatibility issues
uv pip install rembg "numba>=0.60.0"

# 3. Install missing runtime dependencies
# These are required but sometimes not pulled automatically in minimal environments
uv pip install onnxruntime click asyncer fastapi uvicorn watchdog python-multipart filetype gradio aiohttp
Usage
source .venv/bin/activate
rembg i input.png output.png

2. python-gradio AUR Installation (System Method)

If installing python-gradio from AUR, you may encounter build errors.

Issues & Fixes
  1. Circular Dependency: python-gradio <-> python-gradio-client.
    • Fix: Install python-gradio-client first, then python-gradio.
  2. Build Error (EACCES): pnpm tries to write to /usr/local.
    • Fix: Patch PKGBUILD to use a local PNPM_HOME.
Patched PKGBUILD Snippet

Add this to the build() function in PKGBUILD:

build() {
  cd "$srcdir"/$_name-$_name-$pkgver
  # Fix for pnpm EACCES error
  export PNPM_HOME="$srcdir/pnpm"
  export PATH="$PNPM_HOME:$PATH"
  pnpm config set store-dir "$srcdir/pnpm-store"

  pnpm i --frozen-lockfile --ignore-scripts
  NODE_OPTIONS="--max-old-space-size=8192" pnpm build
  PYTHONPATH=$PWD python -c "import gradio"
  python -m build --wheel --no-isolation
}

patina commented on 2025-09-10 14:49 (UTC) (edited on 2025-09-10 17:31 (UTC) by patina)

@bannert I just rebuilt with the python-numpy and had no issues. python-gradio doesn't have python-numpy1 under dependencies. Perhaps clean build python-gradio? I provided the PKGBUILD I used for python-rembg.

PKGBUILD
# Maintainer: Winux <winux@winux.it>
pkgname=python-rembg
_pkgname=rembg
pkgver=2.0.67
pkgrel=1
pkgdesc="Rembg is a tool to remove images background"
arch=('any')
url="https://github.com/danielgatis/rembg"
license=('MIT')
depends=('python' 'python-jsonschema' 'python-numpy' 'python-onnxruntime' 'python-opencv' 'python-pillow' 'python-pooch' 'python-pymatting' 'python-scikit-image' 'python-scipy' 'python-tqdm' 'python-aiohttp' 'python-click' 'python-fastapi' 'python-filetype' 'python-gradio' 'python-python-multipart' 'uvicorn' 'python-watchdog' 'python-asyncer')
makedepends=('python-setuptools' 'python-build' 'python-installer' 'python-wheel' 'python-twine')
source=("$_pkgname-$pkgver.tar.gz::https://github.com/danielgatis/rembg/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('eff32b41b667f648bb0543a41aa836f3119b167700e836f3ddb3483b6252170b')
build() {
  cd "$srcdir/$_pkgname-$pkgver"
  python -m build --wheel --no-isolation
}

package() {
  cd "$srcdir/$_pkgname-$pkgver"
  python -m installer --destdir="$pkgdir" dist/*.whl
}

bannert commented on 2025-09-10 11:31 (UTC)

Installation fails with this error:

error: can't build python-rembg-2.0.67-1, deps not satisfied: python-numpy1  python-gradio
error: packages failed to build: python-numpy1-1.26.4-5  python-gradio-pdf-0.0.22-1  python-gradio-client-1.12.1-1  python-safehttpx-0.1.6-4  python-gradio-5.44.1-1  python-rembg-2.0.67-1

patina commented on 2025-09-09 20:27 (UTC) (edited on 2025-09-09 21:08 (UTC) by patina)

I've gotten python-rembg to build and work with python-numpy by just swapping them in the pkgbuild

Winux commented on 2024-11-09 17:30 (UTC)

Unfortunately not as upstream only supports numpy version 1.xx

nixit commented on 2024-11-09 12:10 (UTC)

is there a chance that python-numpy1 could be upgraded to the latest python-numpy-2.1.3.1 (as of this post)?