Is there a difference between classic venv and uv's venv?

As title. I’m used to create classic venvs, but I’m curious if uv’s venv offer some improvements.

My understanding is that the underlying venv is the same. Using uv makes creation that much simpler though.

python -m venv py_venv
uv venv uv_venv
du -sh *_venv
diff -rq *_venv
12M	py_venv
80K	uv_venv
Files py_venv/bin/activate and uv_venv/bin/activate differ
Only in uv_venv/bin: activate.bat
Files py_venv/bin/activate.csh and uv_venv/bin/activate.csh differ
Files py_venv/bin/activate.fish and uv_venv/bin/activate.fish differ
Only in uv_venv/bin: activate.nu
Only in uv_venv/bin: activate.ps1
Only in py_venv/bin: Activate.ps1
Only in uv_venv/bin: activate_this.py
Only in uv_venv/bin: deactivate.bat
Only in py_venv/bin: pip
Only in py_venv/bin: pip3
Only in py_venv/bin: pip3.13
Only in uv_venv/bin: pydoc.bat
Files py_venv/bin/python and uv_venv/bin/python differ
Files py_venv/bin/python3 and uv_venv/bin/python3 differ
Files py_venv/bin/python3.13 and uv_venv/bin/python3.13 differ
Only in uv_venv: CACHEDIR.TAG
Files py_venv/.gitignore and uv_venv/.gitignore differ
Only in py_venv: include
Only in py_venv/lib/python3.13/site-packages: pip
Only in py_venv/lib/python3.13/site-packages: pip-24.2.dist-info
Only in uv_venv/lib/python3.13/site-packages: _virtualenv.pth
Only in uv_venv/lib/python3.13/site-packages: _virtualenv.py
Only in py_venv/lib64/python3.13/site-packages: pip
Only in py_venv/lib64/python3.13/site-packages: pip-24.2.dist-info
Only in uv_venv/lib64/python3.13/site-packages: _virtualenv.pth
Only in uv_venv/lib64/python3.13/site-packages: _virtualenv.py
Files py_venv/pyvenv.cfg and uv_venv/pyvenv.cfg differ
3 Likes

Hmmm… Does the default in one produce copies and in the other symlinks?

It’s site-packages that makes all the diference. venv bundles pip, while uv doesn’t need to.

󰅂 du -sh ??_venv/lib/python3.13/site-packages/*
12M	py_venv/lib/python3.13/site-packages/pip
104K	py_venv/lib/python3.13/site-packages/pip-24.2.dist-info
4.0K	uv_venv/lib/python3.13/site-packages/_virtualenv.pth
8.0K	uv_venv/lib/python3.13/site-packages/_virtualenv.py
1 Like

You could try to compare with python -m venv --without-pip py_venv. Maybe also try the --symlink option.

Ty for the diff. The fact that puzzle me of is that activate and deactivate scripts are different. I’m not a bash/cmd expert, so I can’t understand if there are radical changes or not.

Looks like uv venv adapted its activate scripts from virtualenv, not python -m venv.