uv: An extremely fast Python package and project manager, written in Rust

by chirauon 6/23/2025, 4:27 PMwith 335 comments

by acheong08on 6/23/2025, 6:56 PM

Just a few months back I said I would never use uv. I was already used to venv and pip. No need for another tool I thought.

I now use uv for everything Python. The reason for the switch was a shared server where I did not have root and there were all sorts of broken packages/drivers and I needed pytorch. Nothing was working and pip was taking ages. Each user had 10GB of storage allocated and pip's cache was taking up a ton of space & not letting me change the location properly. Switched to uv and everything just worked

If you're still holding out, really just spend 5 minutes trying it out, you won't regret it.

by polivieron 6/23/2025, 6:17 PM

The first time I used `uv`, I was sure that I had made a mistake or typed something wrong because the process finished so much more quickly than anything I had ever experienced with `pip`.

by theLiminatoron 6/23/2025, 5:43 PM

uv and ruff are a great counterexample to all those people who say "never reinvent the wheel". Don't ever do it just for the sake of doing it, but if you have focused goals you can sometimes produce a product that's an order of magnitude better.

by larkoston 6/23/2025, 8:19 PM

Just a warning in case others run into it: on very anemic systems (e.g.: AWS T2.micro running Windows, yes... I know...) uv will try to open too many simultaneous downloads, overloading things, resulting in timeouts.

You can use ent ENV variable UV_CONCURRENT_DOWNLOADS to limit this. In my case it needed to be 1 or 2. Anything else would cause timeouts.

An extreme case, I know, but I think that uv is too aggressive here (a download thread for every module). And should use aggregate speeds from each source server as a way of auto-tuning per-server threading.

by leonheldon 6/23/2025, 5:39 PM

I adore the

  uv add <mydependencies> --script mycoolscript.py
And then shoving

  #!/usr/bin/env -S uv run
on top so I can run Python scripts easily. It's great!

by mh-on 6/23/2025, 5:25 PM

Started using this recently for personal stuff on my laptop. When you're used to pip, it's just confusingly fast. More than once I thought maybe it didn't work because it returned too quickly..

by pu_peon 6/23/2025, 5:35 PM

Tried uv a while ago and I was shocked by how fast and easy it is to use. There's basically no reason to use pip anymore, and if you're using only Python there's basically no reason to use conda either.

by eats_indigoon 6/23/2025, 5:36 PM

Love UV!

Also love Ruff from the Astral team. We just cut our linting + formatting across from pylint + Black to Ruff.

Saw lint times drop from 90 seconds to < 1.5 seconds. crazy stuff.

by nickjjon 6/24/2025, 12:56 AM

If anyone is looking for examples on using uv with Docker, I have Flask and Django example apps at https://github.com/nickjj/docker-flask-example and https://github.com/nickjj/docker-django-example.

It prevents uv from making a virtual environment and does some optimizations like compiling byte code once when your dependencies get installed.

It was well worth the switch. I noticed a ~10x improvement for speed compared to pip (30s to 3s to install all dependencies). Proper lock file support is nice too. Funny enough I wrote about and made a video about switching to uv about a week ago here https://nickjanetakis.com/blog/switching-pip-to-uv-in-a-dock....

by nrvnon 6/23/2025, 7:21 PM

this is my new fav for running small executable scripts:

  #!/usr/bin/env -S uv --quiet run --script
  # /// script
  # requires-python = ">=3.13"
  # dependencies = [
  #     "python-dateutil",
  # ]
  # ///
  #
  # [python script that needs dateutil]

by neveson 6/23/2025, 6:39 PM

It is a venture capital startup. If I start use uv, what's our protection against the company going rogue?

by 6ak74rfyon 6/23/2025, 6:35 PM

UV is fast, like FAST. Plus, it removes the need for pyenv (for managing different Python versions) and pip for me. Plus, no need to activate env or anything, `uv run ...` automatically runs your code through the env.

It's a nice software.

by psunavy03on 6/23/2025, 5:39 PM

I'm sold. Never going back to pip/twine/requirements.txt again if I don't have to. I have several projects that all share a common wheel hosted on an internal GitLab instance, and I was able to replace like 10 lines of YAML with just "uv build" and "uv publish." Importing is quick and easy, and you can see what your core dependencies are as opposed to everything just being in one mess of a requirements.txt.

by tandavon 6/23/2025, 6:19 PM

Still no option to store virtual envs outside projects after a year

https://github.com/astral-sh/uv/issues/1495

by shpxon 6/23/2025, 7:02 PM

For running scripts on my personal computer I really don't care for all the dependency management stuff. I just want a single, globally installed latest version of a library, like what pip does. I've never had the problem of an old script breaking, I guess because I just don't run that much software. These things for writing out explicit versions of everything and reinstalling libraries for every single project just add a lot of overhead, extra typing and an extra layer of complexity that I don't care for. I like just typing "pip install requests" and then being able to do "import requests" in any REPL or script for the next few years, occasionally running a Bash alias to upgrade all dependencies (which is a feature that pip incredibly still doesn't have, 14 years later).

I can see how if you've had issues with dependencies you would rave about systems that let you control down to the commit what an import statement actually means, but I like the system that requires the least amount of typing/thinking and I imagine I'm part of a silent majority.

by zero-gon 6/23/2025, 8:54 PM

What’s their motivation to build tools like uv and ruff? What’s their business model?

by xnyanon 6/23/2025, 6:07 PM

Worth using just for 'uv pip' as a replacement for pip on the grounds of being much much faster. I've completely switched to uv and I can't imagine ever going back to pip for this and lots of other outstanding features.

by lucidengon 6/23/2025, 5:53 PM

UV solved any issue I had getting python to run on a machine.

Just `git clone someproject`, `uv run somescript.py`, then mic drop and walk away.

by jimjagon 6/23/2025, 7:01 PM

This has the same issue as so many package managers for Python, namely, it doesn't provide a way for --no-binary to remain sticky.

There are times when you do NOT want the wheel version to be installed (which is what --no-binary implements in pip), but so many package managers including uv don't provide that core, basic functionality. At least for those that do use pip behind the scenes, like pipenv, one can still use the PIP_NO_BINARY environment variable to ensure this.

So I'll not be migrating any time soon.

by incognito124on 6/23/2025, 6:17 PM

uv is almost perfect. my only pet peeve is updating dependencies. sometimes I just want to go "uv, bump all my dependencies to the as latest version as possible while respecting their constraints". I still haven't found an elegant way to do this, but I have written a script that parses pyproject.toml, removes the deps, and invokes `uv add --upgrade` with them.

other than that, it's invaluable to me, with the best features being uvx and PEP 723

by samsartoron 6/23/2025, 9:09 PM

I'm in ML-land. I thought we were all hopelessly tied to conda. But I moved all my own projects to uv effortlesly and have never looked back. Now first thing I do when pulling down another reseacher's code is add a pyproject toml (if they don't have one), `uv add -r`, and `uv run` off into the sunset. I especially like how good uv is with non-pypi-published dependencies: GitHub, dumb folders, internal repos, etc.

by kissgyorgyon 6/23/2025, 8:58 PM

Astral's tools are so fast in general, when you first try them out, you double check what went wrong because you are sure nothing happened.

Same with uv. They are doing very nice tricks, like sending Range requests to only download the metadata part from the ZIP file from PyPI, resolve them in memory and only after that downloading the packages. No other package manager does this kind of crazy optimization.

by holografixon 6/24/2025, 12:34 AM

Can anyone point to the top 3 Rust specific things that UV leverages to make it run so much faster?

Yes I know Rust is not a GC language… go a level deeper

by a_t48on 6/24/2025, 4:00 AM

I've started on a CMake integration to take multiple pyproject.toml files (in a monorepo or such), turn them into an editable workspace venv for development (with dependencies), and then on `make install` package the workspace up into a venv (at some point I'll add a package target...). The lock file ends up checked in and updated whenever you build w/ changes to any of the pyproject files.

This is very very useful for robotics or other places where you might end up with a big list of pip installed packages in some Dockerfile, want them pinned, with just one version of each library across the whole space, but don't want to necessarily do the song and dance of a full python package. Because uv is fast it just kind of works and checking the projects doesn't take any time at all compared to the other build work being done.

by nchmyon 6/23/2025, 7:56 PM

I've been happily using it for a long time, and rye before that.

Just today I set it up on 20 PCs in a computer lab that doesn't have internet, along with vs code and some main packages. Just downloaded the files, made a powershell script and it's all working great with Jupyter etc... Now to get kids to be interested in it...

by jhoechtlon 6/23/2025, 8:11 PM

Its sad that pyrhon only tooling is aparently so imcapable that you have to write it in a compiled language.

After that many years of optimization pure python seems still to be wishfull thinking. It's ai/mk success is also only as a shim language around library calls.

by jauntywundrkindon 6/23/2025, 9:16 PM

I ran into this via Aider. Who centers their user experience on using uv as an installer. https://aider.chat/2025/01/15/uv.html

What was super unclear was how I develop locally with uv. Figuring out I needed `aider sync --extra` then `aider run --projrct /opt/aider aider` to run was a lot of bumbling in the dark. I still struggle to find good references for everyday running projects use with uv.

It was amazing though. There were so many pyproject and other concerns that it just knew how to do. I kept assuming I was going to have to do a lot more steps.

by chuckhendon 6/23/2025, 7:58 PM

Very relevant talk if anyone is interested in learning a bit more about how the project is so fast. https://www.youtube.com/watch?v=gSKTfG1GXYQ

by octo888on 6/23/2025, 7:43 PM

uv has converted people in the same way Google search, Chrome, Git and SSDs did.

Fast is a massive factor.

I haven't used it much, but being so fast, I didn't even stop to think "is it perfect at dependency management?" "does it lack any features?".

by oezion 6/23/2025, 6:06 PM

I continue to be puzzled why sometime running uvx (uv tool run) will redownload all dependencies even though it just downloaded them for another tool. Downloading torch 15 times per day gets old even on 500 mbits

by esafakon 6/23/2025, 10:27 PM

It's not just the programs that are fast, but the company's response. I reported an issue on Discord and the founder fixed it right away, collaborating with me on the PR I created.

by bunderbunderon 6/23/2025, 8:34 PM

uv is indeed fast and easy. But I'm also finding that the maintainers' efforts to make it work like Cargo mean it can be more difficult to use in more complex project structures. As sensible as Rust's project management ethos is, you're never going to escape Python's underlying design in a Python project, and friction between the two philosophies may not be avoidable.

One possible alternative is Pants. It's also written in Rust for performance, but has more flexibility baked into the design.

by jazaon 6/24/2025, 5:13 AM

Switched all my python stuff to poetry several years ago. Still kinda tired and shagged out from that endeavour. Yeah yeah, ok ok, if y'all keep raving THIS much about uv, I guess it must be pretty good ... still, sigh, yet another One True (tm) python package management solution. It's on my todo list, I'll get around to it, I reckon within the next 12 months, currently I have no pressing need to move away from poetry.

by andy_pppon 6/23/2025, 8:56 PM

I have no understanding of python really but very glad I settled on uv. It’s such an improvement user wise over poetry or pip and it’s extremely fast too.

I have one complaint though, I want ./src to be the root of my python packages such that

> from models.attention import Attention

Works if I have a directory called models with a file called attention.py in it (and __init__.py) etc. The only way this seems to work correctly is if I set PYTHONPATH=./src

Surely the environment manager could set this up for me? Am I just doing it wrong?

by johncoleon 6/23/2025, 7:19 PM

I love uv. I am a convert, I use it for everything. One area I find it incredible for: deployment. If I have to launch a docker container and install a lot of python packages it saves so much time and compute.

I also appreciate that it handles most package conflicts and it constantly maintains the list of packages as you move. I have gotten myself into a hole or two now with packages and dependencies, I can usually solve it by deleting venv an just using uv to reinstall.

by IceHegelon 6/23/2025, 8:48 PM

Biggest dev QoL improvement for me since TypeScript has been going all in on uv.

I switched everything over and haven’t looked back.

It’s everything I hoped poetry would be, but 10x less flakey.

by bicepjaion 6/24/2025, 4:01 AM

Started out with conda mainly because it played nicely with jupyter, but after switching to fish and vscode on mac, managing conda environments for Jupyter kernels turned into a pain. Honestly, half my personal projects procrastination comes down to fighting with conda setup. Been hearing a lot of buzz about UV, and this post finally convinced me to give it a shot on my next project.

Sources

by forrestthewoodson 6/23/2025, 6:21 PM

Here’s my #1 complaint about uv: I’m new to the python ecosystem. I don’t know anything about pip or the existing tools. I would love for uv to at least have documentation and a user guide that doesn’t assume knowledge of the old bad tools that uv replaces.

Perhaps uv will continue its ascendancy and get there naturally. But I’d like to see uv be a little more aggressive with “uv native” workflows. If that makes sense.

by tfariason 6/23/2025, 9:23 PM

I switched to uv in an open source project I maintain as our builds were taking dozens of minutes to resolve dependencies using Poetry. The migration itself was pretty easy as both tools use pyproject.toml, so it was a matter of changing headers and minor adjustments.

After the switch, the same dependency resolution was done in seconds. This tool single-handedly made iteration possible again.

by seatac76on 6/24/2025, 7:02 PM

I’ve been writing Python for over a decade and was still using the Pyenv Virtualenv (dated I know). Lately I had been trying to switch over to Poetry. Somehow it never works smoothly for me.

Then I looked at uv and oh boy is it better. Everything just works and is blazing fast. Kudos to the team.

by aaronbrethorston 6/24/2025, 5:06 AM

I'm looking forward to adopting uv but I'm blocked until Snyk supports it. https://support.snyk.io/s/question/0D5PU00000u1G4n0AE/suppor...

by linsomniacon 6/23/2025, 8:52 PM

I'm setting up a new dev workstation and I'm trying NixOS and for Python work I'm going to try living with "uv" for the bulk of my Python work. An experiment I've just started, but I've been using uv for ~6 months and it's been spectacular and I think it's going to be able to live up to my expectations.

by spapas82on 6/23/2025, 9:52 PM

I don't use uv for my (django) projects because my pip/venv workflow is good enough and had never failed me in 15 years.

However I really like installing uv globally on my Windows systems and then using uvx to run stuff without caring about venvs and putting stuff to path.

by AJRFon 6/23/2025, 6:55 PM

Is there something inheret about rust that means its faster at dep resolution than Python? Like where is the speed up coming from?

Or would it be possible to go this fast in python if you cared enough about speed?

Is it a specific thing that rust has an amazing library for? Like Network or SerDe or something?

by colechristensenon 6/23/2025, 5:42 PM

So how does Astral plan to make money?

by helsinkion 6/24/2025, 5:31 AM

I’ve been writing an equivalent of uv for the R language at work, and it’s quite daunting / unwieldy. I was feeling bad about it, but then I reminded myself that uv has hundreds of contributors and my project only has one.

by renewiltordon 6/23/2025, 7:22 PM

The Astral projects are all great. I hope the company finds a revenue stream in the future with some hosted something or the other because these tools are so useful I don't want them to become pay-for etc.

by joshdavhamon 6/23/2025, 11:14 PM

I still mostly use pip (largely due to habit) but uv has been incredible for speeding up ci workflows! We shaved off a full minute of CI for a python package I maintain when we started using uv.

by gamegodon 6/23/2025, 7:04 PM

Bragging that your program is faster than anything written in Python is a low bar, lol.

Also, it seems like a sign that even Python tooling needs to not be written in Python now to get reasonable performance.

by skangaon 6/24/2025, 6:31 AM

https://github.com/skanga/JarGet is a slightly similar tool for Java

by carlosdpon 6/23/2025, 6:22 PM

I love uv, not just for local development, but it also makes it WAY easier to manage python environments you setup for running python workers / user code in the cloud.

by laurent_duon 6/24/2025, 8:26 AM

Yes `uv` is great but using it to manage dependencies in an AWS Lambda Docker container is really not as simple as using pip or poetry.

by Vasloon 6/23/2025, 6:02 PM

Moved to this and have no need for anything else, especially since uv pip install whatever works with uv and is faster than pip (though I usually use uv add).

by spennanton 6/23/2025, 7:16 PM

I moved from pip to poetry a while back, but was introduced to uv recently while working on MCP stuff. I now use uv for everything and haven’t looked back.

by codethiefon 6/23/2025, 9:51 PM

uv is great! One surprise I recently ran into, though, was that `uv run path/to/foo.py` doesn't look up the nearest pyproject.toml / .venv. Similarly, a script with a shebang `#!/usr/bin/env -S uv run` only executes correctly when executed from within the folder containing the .venv. Am I the only one finding this weird?

by rakel_rakelon 6/24/2025, 4:43 AM

uv is so good, I would recommend it to anyone.

The suffix "written in Rust" is getting cringy though.

by bandramion 6/24/2025, 5:59 AM

I was just thinking the dearth of package managers for Python is such a missed opportunity

by bbd108on 6/24/2025, 6:30 AM

One of may favorite party tricks with uv:

echo 'import antigravity' | uv run -

Thank you astral!

by insane_dreameron 6/23/2025, 11:53 PM

uv is great and we have largely switched over to using it. however, since it doesn't handle compiled binaries, we have to continue using conda for environments where those are needed (i.e., mkl).

by v5v3on 6/24/2025, 10:27 AM

For MacOS the install doesnt mention if on homebrew?

by marifjerenon 6/23/2025, 8:42 PM

Seems a lot of people like this and are happy about it, but I for one am tired of the proliferation of python package management tools.

Many languages have many package management tools but most languages there are one or two really popular ones.

For python you just have to memorize this basically:

- Does the project have a setup.py? if so, first run several other commands before you can run it. python -m venv .venv && source .venv/bin/activate && pip install -e .

- else does it have a requirements.txt? if so python -m venv .venv && source .venv/bin/activate && pip install -r requirements.txt

- else does it have a pyproject.toml? if so poetry install and then prefix all commands with poetry run

- else does it have a pipfile? pipenv install and then prefix all commands with pipenv run

- else does it have an environment.yml? if so conda env create -f environment.yml and then look inside the file and conda activate <environment_name>

- else I have not had to learn the rules for uv yet

Thank goodness these days I just open up a cursor tab and say "get this project running"

by FL33TW00Don 6/23/2025, 8:14 PM

uv has completely changed the experience of Python for me.

by talleson 6/24/2025, 1:56 AM

Why the "written in Rust" in the title?

by egonschieleon 6/23/2025, 6:17 PM

uv has become essential for me. conda and virtualenv never worked smoothly for me, but uv was easy and "just worked" from day 1.

by GardenLetter27on 6/23/2025, 9:37 PM

The only thing keeping Python usable.

by richard___on 6/23/2025, 11:47 PM

Why use this over micromamba?

by mixmastamykon 6/23/2025, 7:28 PM

People always mention the speed, but that's rarely a factor for me.

Rather, pip was broken intentionally two years ago and they are still not interested in fixing it:

https://github.com/pypa/packaging/issues/774

I tried uv and it just worked.

by cagron 6/24/2025, 1:05 AM

was forced to use it for work and was converted!

by heohkon 6/24/2025, 2:18 AM

uvx is the killer app imo

by putnaon 6/23/2025, 5:42 PM

unfairly fast

by aaneton 6/23/2025, 8:52 PM

Now.. can they make Python itself as fast as the package manager??

by singularity2001on 6/23/2025, 9:11 PM

wake me when venv works on mac

by mikevmon 6/23/2025, 7:15 PM

I think http://pixi.sh is much cooler because it supports conda environments so you can install non-python packages as well (e.g, gcc).