Self-contained highly-portable Python distributions

Posted by jcbhmr 1 hour ago

Counter27Comment2OpenOriginal

Comments

Comment by simonw 11 minutes ago

These distributions are excellent. Astral took over maintenance of them a while ago so technically they sit under OpenAI now.

https://github.com/astral-sh/python-build-standalone

If you're looking to bundle Python into another application - a macOS desktop app for example - these are exactly what you need.

Comment by rsyring 15 minutes ago

> Many users of these distributions might be better served by the PyOxy sister project [1]. PyOxy takes these Python distributions and adds some Rust code for enhancing the functionality of the Python interpreter. The official PyOxy release binaries are single file executables providing a full-featured Python interpreter.

1: https://github.com/indygreg/PyOxidizer/

From that readme, it seems PyOxy has a few related uses:

- It can produce a single file executable representing a Python app including the interpreter

- It can ship self-contained Python interpreters and related to be embedded or used as a library in a larger application

- PyOxidizer can serve as a bridge between Rust and Python - "PyOxidizer can be used to easily add a Python interpreter to any Rust project. But the opposite is also true: PyOxidizer can also be used to add Rust to Python."