🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.debian.maint.python
3 messages
3 total messages Started by Ben Finney Mon, 30 Nov 2026 05:40
Installing ‘python-apt-binary’ from PyPI using ‘python3 -m pip’
#83
Author: Ben Finney
Date: Mon, 30 Nov 2026 05:40
34 lines
3266 bytes
Howdy all,

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?


The ‘python-apt’ entry at PyPI has been obsolete for years, and was
“yanked” in 2023. It has no installable version published. Similarly for
the ‘apt’ entry at PyPI.

>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). But when I attempt to install it:

=====
$ python3 -m pip install python-apt-binary
ERROR: Could not find a version that satisfies the requirement
    python-apt-binary (from versions: none)
ERROR: No matching distribution found for python-apt-binary
=====

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?

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

-- 
 \       “Crime is contagious… if the government becomes a lawbreaker, |
  `\          it breeds contempt for the law.” —Justice Louis Brandeis |
_o__)                                                                  |
Ben Finney
Re: Installing ‘python-apt-binary’ from PyPI using ‘python3 -m pip’
#84
Author: Andrey Rakhmatullin
Date: Mon, 30 Nov 2026 07:00
63 lines
4080 bytes
--mbmdKnSJw6KYS5Wy
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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 =E2=80=98pyproject.toml=E2=80=99 project dependencies, s=
o 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 =E2=80=98python-apt-binary=E2=80=99 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=20
correct)

>The <URL: https://pypi.org/project/python-apt-binary/#history> release
>history of the PyPI entry shows sporadic entries, with version =E2=80=9C3.=
0.0=E2=80=9D
>the latest, on 2026-09-15. Why does that not match the specified
>=E2=80=98python-apt-binary=E2=80=99 request?

Likely because the only published wheel is 3.13-only, looking at the file=
=20
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=
=20
that. You can try installing from=20
git+https://salsa.debian.org/apt-team/python-apt/ directly (I haven't=20
tried).

--=20
WBR, wRAR

--mbmdKnSJw6KYS5Wy
Content-Type: application/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEolIP6gqGcKZh3YxVM2L3AxpJkuEFAmsNHJUACgkQM2L3AxpJ
kuG+FRAApjk9oGRkgo1aJK0TAwOYRDs7vXfFs9OXN40jm5B4gW4qcixrhosUZOxS
niu13/GTDnp7u+ZFpbwKsIU40iQEiMOEOCHMDNJSes8yDIwLX3rEdHhNx5KfyIxp
+sCNoFT5f3es5uoIEe5WRn26Gg2rVq7OvSJLDeBxOO1PmlFdqKZ6pWcQoMo+Qncb
CM9pot3Z7qnRVUTet50MIbrXTNYwH1lLr0ZYRQ7v4h/RY2pcTbSprwaUMfc4xnV0
vofTixq8jNSVBolhh7vOuBOe3pVDSIGVohxrK3dWTGYVPxFz8v+lNq5PfK0epAqB
AyDdudVuGDEw//6tvQRtBFp+eHBx2oZv+M3kiREOaR7L3M9noC02rmqHN5QzLkKK
nCB43hDvSIe42KVNKIvf3BPRI3bsvyvjh98xPuxkJWzNOOOx2/WJa2L+NMX8pi5L
Ua+jodoMTyEYkPwz0ls6IoFO/ie7UCbx2Jq4Or3WYkgP++xcVgLqbYeog553dHDG
zbvzNcXWU2MMAKyv1ru6X/C1TP7ZO8CF1BvQJCxPZ94XfAXuRcaEn5N1aUSbW0TT
1C1Uus1yZUVgVJUMt8drOgfvYKhy2limrM86JbO0ViEReCvpveh5A0Hpt2/CcTld
fotTRF1xmO0GuVy+e9+c94M6KiI9E/K9UaUhPHgRgI/IUEf1nfM=
=mkCc
-----END PGP SIGNATURE-----

--mbmdKnSJw6KYS5Wy--
Re: Installing ‘python-apt-binary’ from PyPI using ‘python3 -m pip’
#85
Author: Ben Finney
Date: Mon, 30 Nov 2026 21:50
48 lines
4005 bytes
--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Andrey Rakhmatullin <wrar@debian.org> writes:

> 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 =E2=80=98pyproject.toml=E2=80=99 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.

Okay, it appears none of the PyPI entries constitute an official release
of the APT Python bindings.

That's disappointing. Thank you for clarifying that fact.

=2D-=20
 \          =E2=80=9CIn general my children refuse to eat anything that has=
n't |
  `\                              danced on television.=E2=80=9D =E2=80=94E=
rma Bombeck |
_o__)                                                                  |
Ben Finney

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQJHBAEBCAAxFiEEXfQ3Ydd+6BMR2Ur+B+hY8vqvVjgFAmsN7iUTHGJpZ25vc2VA
ZGViaWFuLm9yZwAKCRAH6Fjy+q9WOGoSD/9dcUi1TjfqFIzeqTWhXLvgyOysFzWx
FtGZECnLQK37Bhdyknw6kPqKJ55qb1w6mgmEkHWGdEBMk19urYKkOce0vY53V9Xd
Lf6Q4D/EQQZhhaK27BvJZfD14XI8phDQgwNDtoxzuOhQoK3qlEI1zP7V9Pvl55yf
FvabCy7GXiD9vbWQ3USpeZYdeXKxh9aMR724ytpoJJ538vmbzBM3Wjgr4rENM8oY
ZMeluXGxmjYK2ShVyJ8+xT3ks2GfVjAaTjz9X7NSGLLbPGSNsNdv/XWdF83cfJQp
wR896qCsMmkm9kKgaE6q3TW43xw2eLPRLJOLg5PDFyQiLUU2DLbdBsw5biJonQNN
bK2f+k0ekZEIXaEDMMMiioHXtnkBoJTV+ee1k+iiQkDhMm6c3rytxK4L3GFkZqRe
XpOHMDuZsaAJnyPk3eNwEutMqX4nJKwfcEP07f8cKMiaBRoRauK3kWBsrftkLwu2
hjvjQny5RTgCnSj+Xw2e8ra1W8spYP2mX9WcASWDcMOjitjtSMGqLDz5zBvewuFG
W3/i5eW0rig2thRU7VaL9xxguqXRvvRVEV1BA27W4ci9ExMdluVpIMWIrbS068Ny
NIzuKb44zkvmDRJUTrv6pna9BM/xXryeWrrUw/jtnEiHv0x7Ad+toaizjdUg/2xV
yEwcGl424W9Fqg==
=CRLc
-----END PGP SIGNATURE-----
--=-=-=--
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads