uv vs venv vs conda: Python Environments Compared
uv, venv and conda all create isolated Python environments, but they do different jobs. See what each does, the commands, and which to choose.
For ordinary Python projects, use uv. If you want zero extra tools, use the built-in venv. Choose conda when you need non-Python software installed alongside Python, which is common in scientific and data work. All three give you an isolated environment so one project’s packages don’t clash with another’s. They differ in how much else they do.
At a glance
| venv | uv | conda | |
|---|---|---|---|
| What it is | Standard-library module | Fast Python project and package manager | Separate package and environment manager |
| Comes with Python | Yes | No (install it separately) | No (install it separately) |
| Creates environments | Yes | Yes | Yes |
| Installs Python versions | No | Yes, downloads it if a version isn’t available | Yes, Python is just another package |
| Non-Python dependencies | No | Only what’s bundled in Python wheels | Yes, its main strength |
| Lock file | No | Yes (uv.lock) | Via exported environment files |
venv: built in and manual
venv is part of Python itself. It creates a lightweight environment on top of an existing Python installation, with its own independent set of packages.
python -m venv .venv
source .venv/bin/activate
python -m pip install requests
You activate it, install with pip, and keep your own record of dependencies. It does nothing about which Python version you have: it uses the one you ran it with. Choose it when you want no extra software and the project is simple.
uv: one fast tool for the whole workflow
uv creates environments, and it also handles Python versions and dependencies:
uv venv # create .venv
uv venv --python 3.11 # request a version
uv run python app.py # run, with the project locked and synced first
If the requested Python version isn’t on your machine, uv downloads it. In a uv project, locking and syncing are automatic: when you use uv run, the project is locked and synced before your command runs, so the environment stays in step with the lockfile. That single tool replaces a combination of pip, a version manager and virtualenv for most workflows, which is the main reason it has taken off. See uv and, for the packaging choices around it, Poetry vs uv vs Hatch.
Choose uv for web apps, command-line tools, libraries and most day-to-day projects. Its limit is that it installs Python packages, so it doesn’t provide native libraries that aren’t bundled inside Python wheels.
conda: environments plus non-Python software
conda is a separate package manager. It treats Python as one package among many and can install the compiled libraries and tools around it, including software that isn’t Python at all.
conda create --name myenv python=3.12
conda activate myenv
That is why it dominates data science and scientific computing, where packages depend on specific C, C++ or Fortran libraries. It is a larger tool than uv, with its own channels and installers to understand, and many people prefer a community-run installer over the full Anaconda distribution. Our virtual environments guide covers alternatives such as Miniforge, micromamba and pixi.
How to choose
- Learning Python, or a small script: venv.
- Most new projects, web apps, CLIs, libraries: uv.
- Scientific stack with heavy native dependencies, or a course that uses conda: conda.
- A team already on one of them and happy: stay put. The best environment tool is the one everyone on the project uses the same way.
Common mistakes
- Installing into the system Python. Always create and activate an environment first, or use
uv run. - Committing the environment folder. Add
.venv/to.gitignoreand commit your dependency list or lockfile instead. - Mixing managers in one environment. Installing with pip or uv into a conda environment can leave it in a state neither tool understands. Pick one tool per environment.
Frequently Asked Questions
What is the difference between uv, venv and conda?
venv is Python’s built-in tool for creating a virtual environment. uv is a fast tool that creates environments and also installs Python versions, manages dependencies and locks them. conda is a separate package manager that can install non-Python software (C libraries, compilers, R) alongside Python, which makes it popular in scientific computing.
Is uv a replacement for venv?
For most people, yes. uv venv creates the same kind of virtual environment, and uv can also install Python itself if the version you asked for isn’t available. The built-in venv module is still a sensible choice when you want zero extra tools.
Is uv a replacement for conda?
Only for pure-Python projects. uv installs Python packages from PyPI, so anything that needs native non-Python dependencies beyond what is bundled in Python wheels is where conda still helps. For many web apps, command-line tools and libraries, uv is enough.
Which should a beginner use?
Start with venv, because it comes with Python and teaches the idea of an isolated environment. Move to uv when you want speed and one tool for Python versions, environments and dependencies. Choose conda if your course or your work depends on scientific packages with native dependencies.
Can I use uv and conda together?
You can, but it complicates things. A common approach is to pick one per project: conda for a data science environment with heavy native dependencies, and uv for ordinary Python projects. Avoid mixing pip or uv installs into a conda environment unless you need to.