Posts

uv as a replecement for pip

How uv Is Better Than pip uv (by Astral) is a modern, high-performance Python package manager intended to be a drop-in replacement for pip , pip-tools , and virtualenv in many workflows. Its advantages are primarily speed, determinism, and ergonomics . 1. Performance (Primary Differentiator) Written in Rust , not Python Dependency resolution is 10–100× faster than pip Parallelized downloads and builds by default Cold installs that take minutes with pip often complete in seconds with uv Practical impact : Large scientific stacks (NumPy, Pandas, PyTorch, bioinformatics libraries) install dramatically faster—particularly relevant in HPC, ML, and bioinformatics environments. 2. Deterministic Dependency Resolution uv uses a lockfile-first model similar to Cargo or Poetry Supports requirements.txt but also: uv pip compile (faster pip-compile ) Fully reproducible environments More reliable resolution under complex dependency graphs Compared to pip : ...

Create Python Virtual Environment at a Custom Path

# Specify a custom path using --prefix   $ mamba create --prefix=/home/t480s/.local/python/py3.12 python==3.12   $ mamba env list   Name Active Path ────────────────────────────────────────────────────                                                /home/t480s/.local/python/py3.12   base      *       /opt/miniforge3  # Give a meaningful name to the python environment  $ mamba config --append envs_dirs /home/t480s/.local/python   $ mamba env list  Name Active Path ────────────────────────────────────────────────────   py3.12          /home/t480s/.local/python/py3.12   base      *     /opt/miniforge3  # Activate the environment   $ mamba activate py3.12   (/home/t480s/.local/python...