https://til.simonwillison.net/python/packaging-pyinstaller
PyInstaller can take a Python script and bundle it up as a standalone executable for macOS, Linux and apparently Windows too (I've not tried it on Windows yet).
Today I managed to build Datasette executables for macOS and Linux using the following recipe: