Telling people to apt-get or brew install python isn’t good advice. It’s best to use something like pyenv so an upgrade doesn’t get rid of the version of python you were relying on.
I ended up using poetry in the end.
Additionally if what you are building is a library, then a container won't fly as you (to my knowledge) cannot publish these to pypi (to make them installable via pip install foo)