On Mon, Nov 30, 2026 at 04:38:34PM +1100, Ben Finney wrote:
I'm attempting to install Debian's APT bindings for Python, in a
virtualenv and/or ‘pyproject.toml’ project dependencies, so that
programs can (for example) `import apt_pkg`. How should that be done?

As it's not on PyPI there is no official way to do this.

From what I can tell, the ‘python-apt-binary’ PyPI entry is what I need
<URL: https://pypi.org/project/python-apt-binary/> (though its metadata
is sparse and unhelpful).

(I wouldn't install random PyPI packages only because the name seems correct)

The <URL: https://pypi.org/project/python-apt-binary/#history> release
history of the PyPI entry shows sporadic entries, with version “3.0.0”
the latest, on 2026-09-15. Why does that not match the specified
‘python-apt-binary’ request?

Likely because the only published wheel is 3.13-only, looking at the file name.

How should I be getting this dependency satisfied in a Python project?

I wouldn't, considering that upstream has not done the necessary work for that. You can try installing from git+https://salsa.debian.org/apt-team/python-apt/ directly (I haven't tried).

--
WBR, wRAR

Attachment: signature.asc
Description: PGP signature

Reply via email to