A lightweight virtualenvwrapper replacement for uv
Project description
uv-virtualenvwrapper
A lightweight replacement for virtualenvwrapper when using uv.
Why uv-virtualenvwrapper?
uv is a fantastic, high-performance tool for managing Python packages and virtual environments. However, it currently lacks a built-in way to easily manage multiple named environments in a centralized location (see feature request).
uv-virtualenvwrapper fills this gap by providing a simple bash/zsh script with tab completion, mirroring the core functionality of virtualenvwrapper specifically for use with uv. It allows for quick creation, activation, removal, and listing of named Python virtual environments. Virtual environments are stored centrally in ~/.virtualenvs by default and can be activated with workon <name>. Pre/postactivate hooks from virtualenvwrapper are not supported.
Installation
Method 1: Direct Download
- Download the script: Download uv-virtualenvwrapper.sh.
- Add to shell config:
Add
source /path/to/uv-virtualenvwrapper.sh
to your shell configuration file (~/.bashrcor~/.zshrc).
Method 2: Install with uv
- Install uv-virtualenvwrapper:
uv tool install uv-virtualenvwrapper
- Add to shell config:
Add
source $(which uv-virtualenvwrapper.sh)
to your shell configuration file (~/.bashrcor~/.zshrc).
Usage
| Command | Description |
|---|---|
mkvirtualenv [options] <name> |
Creates a new virtual environment named <name> and activates it. All options are passed to uv venv --seed. |
workon [name] |
Activates the virtual environment named <name>. If no name is given, lists available environments. |
rmvirtualenv <name> |
Removes the virtual environment named <name>. |
lsvirtualenv |
Lists all available virtual environments. |
deactivate |
Deactivates the current virtual environment. (Standard venv command) |
Virtual environments are stored in WORKON_HOME (default: ~/.virtualenvs).
Example:
$ mkvirtualenv myenv
$ uv pip install requests
$ deactivate
[...]
$ workon myenv
$ uv pip list
License
Links
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file uv_virtualenvwrapper-1.0.0.tar.gz.
File metadata
- Download URL: uv_virtualenvwrapper-1.0.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
834784e599926d387d9d4cc9343b62ef530bdba20092881091ef4564e7b479b0
|
|
| MD5 |
3002a457c031636ec86b83753e622094
|
|
| BLAKE2b-256 |
ad1294c0f4967fdbfc4e2063db44a02d792f4701019e6ca1ff1e4049ceee3e81
|
File details
Details for the file uv_virtualenvwrapper-1.0.0-py3-none-any.whl.
File metadata
- Download URL: uv_virtualenvwrapper-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b168ffa5188c38046048caca538bcf59fb42449bec08d7f412a458488efbb381
|
|
| MD5 |
779329704d69b3f2a95094bd173f5b91
|
|
| BLAKE2b-256 |
db04600cc8bd9453a83d50bbe689725d705fbb5235a19417a7b4045e13145d82
|