Skip to main content

uvenv: pipx for uv (🦀)

Project description

uvenv: pipx for uv

pypi wheels snapcraft

Inspired by:

Installation

New: uvenv is now also installable via the snap store.
The pip method is still recommended, but if you want to use snap, please check out docs/snap.md!

  1. Install via pip (or alternatives):
    pip install uvenv  
    # or `uv install uvenv`, `pipx install uvenv`
    

Note: On some systems (e.g., Ubuntu 24.04+), global installation via pip is restricted by default. The recommended way to install uvenv for these systems is to use the install.sh script:

$SHELL -c "$(curl -fsSL https://raw.githubusercontent.com/robinvandernoord/uvenv/uvenv/install.sh)"
# instead of `$SHELL`, you can also use `sh`, `bash`, `zsh`
> ```
For more installation alternatives, see [docs/installation.md](docs/installation.md) if you encounter `externally-managed-environment` errors.
  1. Optional (for bash users):

    uvenv setup
    

    This installs the following features:

  • Ensures ~/.local/bin/ is added to your PATH, so commands can be found (unless --skip-ensurepath). Can also be activated via uvenv ensurepath
  • Enables tab completion for uvenv (unless --skip-completions). Can also be enabled via uvenv completions --install.
  • Enables uvenv activate (unless --skip-activate) to activate uvenv-managed virtualenvs from your shell

Usage

uvenv

Most pipx commands are supported, such as install, upgrade inject, run, runpip.
Run uvenv without any arguments to see all possible subcommands.

🆕 Freeze and Thaw

You can snapshot your current setup into a uvenv.lock file using:

uvenv freeze

This lock file records all installed applications along with their metadata — including version, Python version, and any injected dependencies.

Later, you can restore that exact setup using:

uvenv thaw

This is useful for replicating the same setup on a different machine, or after a clean install or system update.

Lock file formats

The uvenv.lock file can be saved in one of the following formats:

  • TOML (default): human-readable and easy to edit
  • JSON: more verbose, but script-friendly (e.g. with jq)
  • Binary: compact, but not human-readable

Choose the format using the --format flag:

uvenv freeze --format json

Selective freeze/thaw

Use --include or --exclude to control which apps get recorded or restored:

uvenv freeze --exclude some-app
uvenv thaw --include only-this-app

For all available options, see:

uvenv freeze --help
uvenv thaw --help

Migration from uvx

Note: The tool previously named uvx is now uvenv due to a naming collision with a new uv command. The new name better reflects its purpose, combining uv with venv.
You can run uvenv self migrate to move your environments and installed commands from uvx to uvenv.

Platform Considerations

  • Rust-Powered Performance (uvenv 2.0): Starting from version 2.0, uvenv leverages Rust for improved performance and compatibility with uv.
  • Prebuilt Binaries: Currently, prebuilt binaries are available for x86_64 (amd64) and aarch64 (ARM64) on Linux, as well as Intel (x86_64) and Apple Silicon (ARM64) on macOS.
  • Other Platforms: If you're on a different platform, you can still use uvx 1.x, which is written in pure Python. Find it at robinvandernoord/uvx.
  • Alternatively, you can Compile for Your Platform:
    • Install the Rust toolchain:
      curl https://sh.rustup.rs -sSf | sh
      
    • Clone the uvenv repo and navigate to it:
      git clone https://github.com/robinvandernoord/uvenv.git
      cd uvenv
      
    • Set up a virtual environment (choose Python or uv):
      python -m venv venv  # or `uv venv venv --seed`
      source venv/bin/activate
      
    • Install Maturin (Python with Rust package builder):
      pip install maturin  # or `uv pip install maturin`
      
    • Compile and install the uvenv binary:
      maturin develop
      
    • Now you can use uvenv:
      ./venv/bin/uvenv
      

For additional details on building and distribution, refer to maturin documentation.

License

uvenv is distributed under the terms of the MIT license.

Changelog

See CHANGELOG.md on GitHub

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uvenv-3.8.3.tar.gz (90.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

uvenv-3.8.3-py3-none-musllinux_1_2_x86_64.whl (4.4 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

uvenv-3.8.3-py3-none-musllinux_1_2_aarch64.whl (4.1 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

uvenv-3.8.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.4 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

uvenv-3.8.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

uvenv-3.8.3-py3-none-macosx_11_0_arm64.whl (3.9 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

uvenv-3.8.3-py3-none-macosx_10_12_x86_64.whl (4.2 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file uvenv-3.8.3.tar.gz.

File metadata

  • Download URL: uvenv-3.8.3.tar.gz
  • Upload date:
  • Size: 90.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.3

File hashes

Hashes for uvenv-3.8.3.tar.gz
Algorithm Hash digest
SHA256 4fdf0265d92ede4a9f2f706e068551c568d5b1f200fed1339caa5bf011742a69
MD5 5f5588338367c203036bee3831d82fd7
BLAKE2b-256 05d858183dc05558a50d3b35520081b3d3c78cb1bb5eab5bccbd5c8c695e6e22

See more details on using hashes here.

File details

Details for the file uvenv-3.8.3-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for uvenv-3.8.3-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 fcf0f5e1aa0de20adbbd06fc4f7257f28f9f3f77c390908dcf328c872f3a3b79
MD5 c579ae6b6f59ae523cb0f181a83fdb8a
BLAKE2b-256 2c9b877ee55f50db9556beae2640664b48540f5b5b96024f586f0e1abb5ceb9f

See more details on using hashes here.

File details

Details for the file uvenv-3.8.3-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for uvenv-3.8.3-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 baba3aaeca6352f7fce07683353af8c46615cbb33697c7e2821c1e51e65546c4
MD5 850a17f7e0376e50f835d4f89ed0a049
BLAKE2b-256 183365682620f532b6d4e9fef19df219b9cd5b7b02db243f91783488417f68c5

See more details on using hashes here.

File details

Details for the file uvenv-3.8.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for uvenv-3.8.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 002f915545b0c824537a0ae1951e7a8e9ab8982c17cda4da27040d9c88276999
MD5 b5644f4a9781aeac3d175376a1ad6076
BLAKE2b-256 df065ed68a2c9ce2d9e1ee52065a74d7196de99012d9b9a77a3e5d8b5f2db094

See more details on using hashes here.

File details

Details for the file uvenv-3.8.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for uvenv-3.8.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 9fa6ef39d85d35f8560147193af340655b5d5dc2fddb08d0ba1453137c13fbaf
MD5 8f8f176486d599df278c04ced866e8b7
BLAKE2b-256 936ba7f50d1c7f9a22bf673ecff4134812dba468a73117ef9a0ecbbbb3e43b85

See more details on using hashes here.

File details

Details for the file uvenv-3.8.3-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for uvenv-3.8.3-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bc33fd1a0e7dcd829d6e552e371c93e7c8024354abc530812be97c2e460fb10d
MD5 37da0d2dbd34f57f90eb4256db6027db
BLAKE2b-256 233f9d27bbe4737eea3e228b3a8efd077d7857dc28477296b1e70a7fde9bb4b3

See more details on using hashes here.

File details

Details for the file uvenv-3.8.3-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for uvenv-3.8.3-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 59534fe5a92f5a1fb82d1e55316df8cd9a037f9c13b3946ae6f570846eb87e9a
MD5 5b8b66545b7c55ef0933c0b9a7d62e6f
BLAKE2b-256 f2e45878134cc48c37510d339744c9b2d3eae4f2f8ac167ffc40f1c3c82711e3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page