Post

python-build-standalone has exploded in popularity, with over 70M downloads all-time. But what is a "standalone" Python build? It wasn't obvious to me at first! Initially, I didn't understand what problem was being solved or why it mattered...

20 reposts160 likes

I especially appreciate the standalone builds on HPC clusters. Where I usually have to do `module load python/3.11.6` and remember the correct Python version I created whichever venv with. With uv's "only-managed" option, I no longer have to worry about that.

Great news. Do not forget pyoxidozer. It is a great tool, that just needs a bit of more compatibility, and could be part of uv, maybe as "uv bundle" command. It would be great that Indygreg huge effort does not vanish.

This is fine if you're building and installing Python on a single machine... but it's a problem if you want to pre-build Python and then distribute it to other machines, since those paths might be wrong!

Normally, CPython is also dynamically linked against a number of system libraries, which can cause trouble if the target machine doesn't have those libraries installed.

Which reminds me of my main problem with standalone builds on macOS: I can’t compile wheels because they assume some super weird Xcode path. I think it’s fair to say they can’t go full mainstream with that limitation so I wonder if that’s solvable at all? :-/

uv on HPC is such a cheat code. It is so easy to share python environments with collaborators, no more locally installed conda envs, or funky envs that don’t work. @crmarsh.com Do you have any other suggestions on how uv can be optimized for HPC usage?

I don't think it is platform independent: "PyInstaller is tested against Windows, MacOS X, and Linux. However, it is not a cross-compiler; to make a Windows app you run PyInstaller on Windows, and to make a Linux app you run it on Linux, etc."