Wrote some notes on Aider's unconventional but kind of brilliant installation mechanism, which solves the "isolated Python virtual environment" problem by bundling uv as a dependency! simonwillison.net/2025/Mar/6/a

@simon That still requires you to `pip install` something in some environment, no? I feel like having a random installer with a dependency on `uv` in your (system?) python is not a good side-effect of this.

Better to have people install `pipx` and then use that to install your CLI tool. It's got the same "now pipx has to live in my global system directory" problem, but at least `pipx` is the *only* think you need there.

Follow

@simon The biggest problem I think people have and possibly will continue to have is "where do I get my Python". The system python is not a good thing to use for random stuff.

I haven't looked much into how `uv` handles installing and managing Python versions for you, but if it's halfway decent, then you probably don't want to abstract over that anyway, you want to tell people, "Install `uv` as a system package, then use it to install `aider`".

@pganssle @simon If it were me, I'd bootstrap it with UV and let it pick up the version of Python you want. You could even bootstrap it or shebang it if you needed a more complex build.

@webology @simon I mean you don't have to bootstrap if you have uv, right? Install uv, possibly `uv python install`, then `uv tool install <my tool>`.

@pganssle that's what I think is clever about the Aider trick: if you DO have at least something that runs when you type "python" it can bootstrap a Python 3.12 that works well from that

There are other options (including curl script one) provided too, but the uv dependency one is a particularly neat way of NOT having to teach people about system packages, uv, environments etc

@pganssle @simon Some of us have plans/hopes to create relocatable builds of CPython that are available from python.org, but it takes time and effort.

@simon I agree, hence why it's #8 on my personal Python "Big Plans" list.

@brettcannon @pganssle @simon if somebody starts working on this, pypy has been doing this for years on a bunch of platforms, we'd be happy to help out

@cfbolz @pganssle @simon There's some talk on the python-dev Discord if you happen to have access via HPy or something, but right now it's mostly python-build-standalone trying to get BOLT working.

@brettcannon @pganssle @simon I think that would be a splendid thing! Where can I participate and help with this?

@jezdez @cfbolz Zanie from Astral is working to upstream some of the patches from github.com/astral-sh/python-bu, you could contact them there or in the Astral Discord.

@brettcannon @pganssle @simon

@pganssle @simon The Python handling is decent (while I use it via PDM rather than uv, it's the same python-build-standalone mechanism that I've recommended elsewhere underneath). uv also has pipx style functionality built in to it.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.