2026-03-30 16:25 UTC
Python packaging question:
I have a package on PyPI that depends on keras. Keras can work with either jax, torch, or tensorflow, but I want to let the user in charge of which of those they install.
So, currently, keras is in my default dependencies, and I have three optional feature sets: one with each backend, which I can install with the brackets syntax.
Which means that the "plain" installation is non-functional, because it lacks a backend library.
So, I am wondering if there would be a way to make one of the backends the default one, while still keeping the possibility to not install it (and install another one instead) in case the installation is difficult on a user's machine?
I think I am thinking of something similar to Rust's default features, which are installed by default but can be not installed if requested
#Python #PyPI
Replies (0)
No replies.