Resources mentioned in this lesson:
Installing and Updating uv
00:00
So we’re going to learn how to do a bunch of stuff with uv
, but what is uv
? uv
is a popular tool by Astral, which is the company behind Ruff, which you might have heard of.
00:12 It’s a very fast linter. If you are curious about it, you can check the Real Python tutorial on Ruff so that you can format and lint your code at amazingly fast speeds.
00:25
And uv
is this all-in-one solution that allows you to do everything you need when working with Python and then some. So you can manage projects like you’ll see in this course.
00:37
You can run scripts, you can install and manage Python versions with it. You can install and manage Python packages with uv
, and you can even do other things.
00:47
The thing is uv
is currently under very active development, so improvements are very frequent. Changes to what we’re going to cover are very, very unlikely because we’re going to be scratching the surface only and we’re going to be looking at some very core fundamental features of uv
.
01:05
So those are very unlikely to change, but be warned that uv
is under very active development. So we’re going to be setting up uv
in a second and I will be running a given version of uv
and chances are, in two weeks, you’ll have a more recent version.
01:22 But don’t worry, that’s alright.
01:25
To set up uv
, you can do either one of two things. If you don’t have it already, my recommendation is that you install uv
by following the official docs guide.
01:35 You’ll have a link handy for that and once you do, you’ll want to check the installation to make sure it’s successful. And you can do that by opening a terminal.
01:46
And once you’re in your terminal, you can run uv --version
01:50
and you should get something like this. The numbers themselves might be different because like I said, uv
is under very active development as of the time of this recording, but the command should work and you should get an output that looks something like this.
02:07
If you already have uv
installed, then what you’ll also want to do, if you just installed it, you don’t need to do this, but if you’ve installed it in the past, what you want to do is actually make sure that uv is up to date because it’s frequent that changes are released.
02:24
The way you update uv
is actually fairly simple. There’s a command for that. You go to your terminal
02:31
and once you’re in your terminal, you run uv self update
.
02:37
You give it a second, it checks for updates. You may or may not have updates to install. And in my case, I did have updates and so it upgrades uv
and then you get a success message.
02:47
In case you just installed it, or in case you updated it recently enough, if you run uv self update
, then it’s going to say that it’s checking for updates.
02:57 And then it also shows you a success message, but it tells you you’re already on the latest version so it doesn’t install anything.
03:05
This is what you need to do as far as setting up is concerned. In the next lesson, you’re going to take uv
that you just installed or you just updated, and you’re going to create your first project with it.
Become a Member to join the conversation.