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 requestsYou 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 firstIf 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.
uv vs venv: what actually differs
Both create a standard virtual environment (a uv environment has the usual pyvenv.cfg), so code runs the same in either. The differences are in what surrounds the environment. These numbers are from one Apple silicon Mac with uv 0.13.8 and Python 3.15.2, so treat them as a rough guide:
| venv + pip | uv | |
|---|---|---|
| Create an environment | 2.90 s (python -m venv v1) |
0.07 s (uv venv u1) |
Install requests and rich, no caches |
5.29 s | 2.15 s (uv pip install) |
| Same install, uv’s cache warm | not applicable | 0.43 s |
pip inside the new environment |
Yes | No, unless you ask for it |
| Choose a Python version | Uses the interpreter you ran | uv venv --python 3.12 finds or downloads it |
| Environment location | Wherever you create it, usually .venv |
.venv next to pyproject.toml |
| Lock file | None | uv.lock, a cross-platform lockfile |
Two of those rows catch people out. First, a new uv environment has no pip: running .venv/bin/python -m pip fails with No module named pip. That is by design, because uv installs packages itself with uv pip install or uv add. If a tool or a habit needs pip in the environment, create it with uv venv --seed, which adds it. Second, uv venv with no version chose a uv-managed Python 3.13 here, not the 3.15.2 that python3 pointed to, so name the version you want.
Choose venv when you can’t install anything else (a locked-down machine, a minimal CI image), or when you are teaching the idea of an environment. Choose uv when you want one tool for the environment, the Python version and the locked dependencies, and the speed is a bonus. The old advice to keep .venv/ out of Git is handled for you either way: uv’s docs say its .venv is excluded from Git by an internal .gitignore, and Python 3.13+ venv writes one too.
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 myenvThat 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. What Is Anaconda? explains how Anaconda, Miniconda and Miniforge differ and who can use them for free. Our virtual environments guide covers alternatives such as Miniforge, micromamba and pixi.
uv vs conda (and conda vs uv): which to pick
They overlap on “create an environment with a chosen Python”, then diverge. The comparison below leans on the two tools’ own documentation, since conda is not installed on the machine where the uv examples above were run.
| uv | conda | |
|---|---|---|
| Where packages come from | PyPI (wheels and source) | Conda channels such as conda-forge |
| Where environments live | .venv inside each project |
Named environments, created in the conda installation’s envs folder |
| Non-Python software | Only what is bundled inside Python wheels | Installs it as packages, a core purpose |
| Reproducing an environment | uv lock writes uv.lock, a universal lockfile covering all platforms and Python versions |
conda export: the YAML format for sharing across platforms, the explicit format for the same platform only |
| Typical home | Web apps, CLIs, libraries, general projects | Scientific and data work with native dependencies |
Pick uv when everything you need is on PyPI, you want environments that live with the project and a lockfile you commit, and nothing in the stack needs a system library that wheels don’t provide.
Pick conda when a package depends on something pip cannot install for you: a compiled scientific library that wheels don’t cover, another language’s runtime, or a whole toolchain pinned in one place. Course material and teams that already share conda environment files are a good reason too.
If you need both, the order matters. conda’s documentation says to use pip only after conda: install as many requirements as possible with conda, then use pip for the rest, and if the environment needs changing afterwards, create a new one rather than running conda after pip. That applies to uv pip as well. For a project that is mostly pure Python with one awkward native dependency, it is usually simpler to keep two environments than to mix the tools in one. Our virtual environments guide covers lighter conda options 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.
Is uv faster than venv and pip?
Yes. In one test on a Mac, uv created an environment about 40 times faster than python -m venv, because it does not install pip, and installed two packages about 2.5 times faster than pip with no caches. It was faster again with its cache warm. The exact times depend on your machine, network and cache, so try your own project; the test setup and times are in the table above.
Why does a uv environment have no pip?
uv installs packages itself, with uv pip install or uv add, so it does not put pip in a new environment. Running python -m pip there fails with No module named pip. Create the environment with uv venv —seed if you need pip inside it.
Where does conda store environments compared with uv?
uv puts a .venv folder inside each project, next to pyproject.toml. conda creates named environments in the envs folder of the conda installation, not in the project, so you activate them by name.