Does uv support global Python install now? I need something like Mise for this.
The work can be tracked in https://github.com/astral-sh/uv/issues/6265
51–56 of 56 posts
Does uv support global Python install now? I need something like Mise for this.
The work can be tracked in https://github.com/astral-sh/uv/issues/6265
I recently watched a talk by the author of uv that was surprisingly fascinating [1]. He goes into a few of the more notable hacks that they had to come up with to make it as fast as it is. The most interesting thing for me was that package resolution in python given constraints defined (eg. in requirements.txt) maps to a boolean satisfiability problem which is NP-complete. So uv uses a custom SAT solver to do this. I…
I haven’t used Conda since 2021 but recall it had a SAT solver that was very slow especially on degenerate cases. How does uv’s sat solver compare?
Earlier quoted context omitted.
PS: one thing I like about my current workflow is no extra tools needed, base python install is all that‘s required.
It’s similar with uv. You have exactly one dependency on the host system – it’s just uv instead of Python. uv will then obtain the correct version of Python for your project. And uv is easier to install than Python – it’s literally just one binary.
In a nutshell, what do I gain from switching to uv from my current workflow, which is: 1) create a venv (`python3.xx -m venv venv`) 2) install packages from a requirements.txt into that venv? One limitation I know of are the inability to detect stale packages. Apart from „blazing fast“, which I‘m not convinced it really matters to me as I rarely touch the dependencies, what are the main reasons why uv is gaining trac…
No need to activate venvs and the almost inevitable Python pathing "murder mysteries". uv installs in venvs first, and only then someplace else (e.g., globally).
No more clunky typing `python -m pip install foo` even when you have activated your venv (or you think you have). `uv pip install foo` is nicer and easier to remember.
uv add will add new dependencies to your pyproject.toml so you don't have to.
uv can setup skeletons for new projects in a nice, modern way
For older projects, you can have uv to resolve dependencies as of a certain date. I imagine this is great for older projects, especially with numerous dependencies.
It might remove the need for pyenv or the need to rely on your system provided Python, since uv can install Python for your project.
Cross-platform lock files
I've just started looking in to uv, so maybe my list isn't complete/very good. Some down sides include, it's still green (has some bugs naturally and lacks some features) and some might not trust/like that it's VC backed.
Earlier quoted context omitted.
Hey there, I experienced a hairy error message recently too while trying to install aider-chat from pypi with Python 3.13 and Pixi (but I was told the error was coming from UV). "Solution": `pixi add python=3.12`, then `pixi add --pypi aider-chat` succeeds without issues. A message like "aider-chat seems to be incompatible with python=3.13, try downgrading to python-3.12" would be great, assuming this is really the c…
Thanks! There's definitely room for improvement there. I'll see what we can do — in general it's a bit of an arcane task to extract clear suggestions from the resolver's error tree.
In a nutshell, what do I gain from switching to uv from my current workflow, which is: 1) create a venv (`python3.xx -m venv venv`) 2) install packages from a requirements.txt into that venv? One limitation I know of are the inability to detect stale packages. Apart from „blazing fast“, which I‘m not convinced it really matters to me as I rarely touch the dependencies, what are the main reasons why uv is gaining trac…
You might gain a couple of things... No need to activate venvs and the almost inevitable Python pathing "murder mysteries". uv installs in venvs first, and only then someplace else (e.g., globally). No more clunky typing `python -m pip install foo` even when you have activated your venv (or you think you have). `uv pip install foo` is nicer and easier to remember. uv add will add new dependencies to your pyproject.to…
Interesting. I imagine this is a selling point for corporate environments.