Conda-like UV Environment Management Tool
Simplify Python virtual environment management with the ultra-fast performance of UV and intuitive Conda-style commands.
Features β’ Installation β’ Quick Start β’ Usage β’ Auto Activation β’ Troubleshooting β’ Uninstall
- π Conda-style Commands: Familiar
create,activate,deactivate,delete,listcommands - β‘ UV Powered: Leverage UV's 10-100x faster package installation speed
- π Smart Auto-activation: Automatically activates the environment when entering a project directory
- π Mirror Configuration: Pre-configured mirrors (e.g., Tsinghua) for faster downloads in some regions
- π― Dual Mode Support:
- Local
.venv: Automatically detects project local environments - Shared Environments: Centralized management in
~/uv_envs/
- Local
- π₯οΈ Cross-platform: Supports Linux, macOS, and Windows (Git Bash)
- Bash (or Zsh)
- UV (If not installed, the installer will prompt to install it)
To ensure the interactive installation works correctly (allowing customization), please download the script before executing it:
Linux / macOS:
# Download installation script
curl -fsSL https://raw.githubusercontent.com/Tendo33/uvm/main/install.sh -o install.sh
# Execute installation (Interactive Wizard)
bash install.sh
# Remove script after installation
rm install.shUsing wget:
wget -qO install.sh https://raw.githubusercontent.com/Tendo33/uvm/main/install.sh
bash install.sh
rm install.shWindows (Git Bash):
# 1. Install UV in PowerShell first (Only needs to be done once)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
# 2. Download and execute installation script in Git Bash
curl -fsSL https://raw.githubusercontent.com/Tendo33/uvm/main/install.sh -o install.sh
bash install.sh
rm install.shThe installation wizard will guide you through:
- π Environment Directory (Default:
~/uv_envs) - π§ UV Installation (Will install automatically if missing)
- π Auto-activation (Optional but recommended)
Non-interactive Installation (Use defaults):
curl -fsSL https://raw.githubusercontent.com/Tendo33/uvm/main/install.sh -o install.sh
bash install.sh -yCustom Environment Directory:
curl -fsSL https://raw.githubusercontent.com/Tendo33/uvm/main/install.sh -o install.sh
bash install.sh --envs-dir /custom/pathInstall Specific Version:
# Install specific tag version
curl -fsSL https://raw.githubusercontent.com/Tendo33/uvm/v1.0.1/install.sh -o install.sh
bash install.sh
# Install development branch
curl -fsSL https://raw.githubusercontent.com/Tendo33/uvm/dev/install.sh -o install.sh
bash install.shIf you want to modify uvm or contribute:
git clone https://github.com/Tendo33/uvm.git
cd uvm
./install.shReload Shell configuration:
source ~/.bashrc # Zsh users use ~/.zshrcEnable Auto-activation (Optional but recommended):
echo 'eval "$(uvm shell-hook)"' >> ~/.bashrc
source ~/.bashrc# Create a Python 3.11 environment
uvm create myenv --python 3.11
# Activate environment
uvm activate myenv
# Install packages (Using UV speed)
pip install requests numpy pandas
# List all environments
uvm list
# Deactivate environment
uvm deactivate
# Delete environment
uvm delete myenv# Create using default Python
uvm create myenv
# Create using specific Python version
uvm create myenv --python 3.11
# Create in custom location
uvm create myenv --path /custom/pathuvm activate myenvNote: Requires Shell integration. Please run
eval "$(uvm shell-hook)"first.
uvm deactivate# List all environments
uvm list
# Output example:
# myenv Python 3.11.5 /home/user/uv_envs/myenv
# * active-env Python 3.12.0 /home/user/uv_envs/active-env* indicates the currently active environment.
# Delete after confirmation
uvm delete myenv
# Force delete (Skip confirmation)
uvm delete myenv --forceuvm supports Smart Auto-activation with two priorities:
Automatically detects and activates the project's local .venv directory:
# In project
cd ~/my-project
uv venv # or uv sync
# Enter directory -> Auto activate
cd ~/my-project
# π Auto-activating local .venv
# Leave directory -> Auto deactivate
cd ~
# π» Deactivating environment (left project directory)Scenario: Modern projects using pyproject.toml, standalone project environments.
Specify a shared environment for projects using requirements.txt:
# Create shared test environment
uvm create test-env --python 3.11
# In legacy project
cd ~/legacy-project
echo "test-env" > .uvmrc
# Enter directory -> Auto activate
cd ~/legacy-project
# π Auto-activating uvm environment: test-envScenario: Multiple projects sharing the same environment, test environments, learning environments.
| Scenario | Environment Location | Activation Method | Use Case |
|---|---|---|---|
| Local Environment | ./venv |
Auto Detection | Standalone projects, pyproject.toml projects |
| Shared Environment | ~/uv_envs/myenv |
.uvmrc file |
Multi-project sharing, test environments |
| Manual Activation | ~/uv_envs/myenv |
uvm activate myenv |
Temporary use, quick testing |
- uvm Config:
~/.config/uvm/envs.json: Environment metadata
- UV Config:
~/.config/uv/uv.toml- PyPI Mirror:
https://pypi.tuna.tsinghua.edu.cn/simple - Python Downloads:
https://mirrors.tuna.tsinghua.edu.cn/python-releases/
- PyPI Mirror:
# Custom environment directory (Default: ~/uv_envs)
export UVM_ENVS_DIR="${HOME}/my-custom-envs"
# Custom config directory (Default: ~/.config/uvm)
export UVM_HOME="${HOME}/.uvm"uvm config mirroruvm config showSolution: Ensure ~/.local/bin is in your PATH:
echo 'export PATH="${HOME}/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrcSolution: Enable Shell integration:
echo 'eval "$(uvm shell-hook)"' >> ~/.bashrc
source ~/.bashrcChecklist:
- β
Shell hook enabled:
~/.bashrccontainseval "$(uvm shell-hook)" - β
Shell reloaded:
source ~/.bashrc - β
.uvmrcfile contains valid environment name - β
.venvdirectory exists and containsbin/activatescript
Solution: Verify mirror configuration:
cat ~/.config/uv/uv.toml
# Should contain:
# [[index]]
# url = "https://pypi.tuna.tsinghua.edu.cn/simple"
# default = trueIf not, run:
uvm config mirror| Feature | uvm | Conda | venv + pip |
|---|---|---|---|
| Speed | β‘β‘β‘ (UV) | π | ππ |
| Auto Activation | β | β | β |
| Mirrors | β (Built-in) | βοΈ (Manual) | βοΈ (Manual) |
| Python Version Mgmt | β | β | β |
| Disk Space | πΎ (Small) | πΎπΎπΎ (Large) | πΎ (Small) |
| Learning Curve | π (Easy) | ππ (Medium) | π (Easy) |
# Create environment in specific path
uvm create myenv --path /mnt/data/envs/myenv
# Environment still tracked by uvm
uvm list # Shows custom path# Create environments with different Python versions
uvm create py38 --python 3.8
uvm create py311 --python 3.11
uvm create py312 --python 3.12
# Easy switch
uvm activate py311Method 1: Local .venv (Recommended for modern projects)
cd ~/my-project
uv venv
uv pip install -r requirements.txt
# Auto activates on directory entryMethod 2: Shared Environment via .uvmrc
cd ~/my-project
uvm create my-project-env --python 3.11
echo "my-project-env" > .uvmrc
# Auto activates on directory entrygraph TD
A[cd into directory] --> B{Check .venv}
B -->|Found| C[Activate local .venv]
B -->|Not Found| D{Check .uvmrc}
D -->|Found| E[Read env name]
E --> F[Activate shared env]
D -->|Not Found| G{Was auto-activated?}
G -->|Yes| H[Deactivate env]
G -->|No| I[Do nothing]
- Windows:
- β uvm works perfectly in Git Bash
- β PowerShell/CMD not supported (Please use Git Bash)
- βΉοΈ UV must be installed manually first (See installation instructions)
- Shell Integration: Must run
eval "$(uvm shell-hook)"to useactivate/deactivate.
- Support
pyenvintegration - Environment Export/Import (
uvm export,uvm import) - Environment Clone (
uvm clone) - Shell Completion (Bash/Zsh)
- Fish shell support
This project is licensed under the MIT License - see the LICENSE file for details.
- astral-sh/uv - Ultra-fast Python package installer
- uv-custom - Inspiration for mirror configuration
- Conda - Inspiration for command design
To ensure interactive uninstall works correctly, please download the script first:
# Download uninstall script
curl -fsSL https://raw.githubusercontent.com/Tendo33/uvm/main/uninstall.sh -o uninstall.sh
# Execute uninstall (Interactive confirm)
bash uninstall.sh
# Remove script after uninstall
rm uninstall.sh# Force uninstall (Skip confirmation)
bash uninstall.sh --force
# Keep Shell config
bash uninstall.sh --keep-shell-configIf you cloned the repository:
cd /path/to/uvm
./uninstall.shWhat will be deleted:
- UVM binaries and libraries
- Configuration files
- Shell integration
What will be kept:
- Your virtual environments (
~/uv_envs) - UV itself
- UV config (
~/.config/uv/uv.toml)
π Detailed Guide: UNINSTALL.md
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Built with β€οΈ for Python developers who value speed and simplicity
β Give it a Star if you find it useful!