Python Version Manager
POSIX-compliant shell script to manage multiple active Python versions.
pvm allows you to quickly install, switch, and manage multiple Python versions from the command line.
$ pvm install 3.12
Now using Python 3.12.8
$ python -V
Python 3.12.8
$ pvm use 3.11
Now using Python 3.11.11
$ python -V
Python 3.11.11
Simple, fast, and flexible.
- Lightweight and POSIX-compliant
- No dependency on Python itself
- Works across shells:
sh,bash,zsh,dash,ksh - Inspired by
nvm, but built specifically for Python - Per-project version management with
.pvmrc - Clean and minimal design
pvm is a Python version manager designed to be installed per-user and used per-shell.
It focuses on Python versions, executables, pip, virtual environments, and project-based version control via .pvmrc.
Works across Linux, macOS, and Windows using WSL.
curl -o- https://raw.githubusercontent.com/pvm-shell/PVM/main/install.sh | bash
or:
wget -qO- https://raw.githubusercontent.com/pvm-shell/PVM/main/install.sh | bash
pvm install 3.12
pvm install 3.11
pvm install 3.10
pvm use 3.12
pvm current
python -V
pvm ls
pvm ls-remote
PVM can detect and use the Python version already installed on your system.
pvm system
Example output:
System Python: Python 3.12.4
Path: /usr/bin/python3
To switch back to the system Python:
pvm use system
echo "3.12" > .pvmrc
pvm use
If the version is not installed:
pvm install
pvm venv .venv
. .venv/bin/activate
Specific version:
pvm venv 3.12 .venv
git clone https://github.com/pvm-shell/PVM.git ~/.pvm
cd ~/.pvm
. ./pvm.sh
Add to your shell config:
export PVM_DIR="$HOME/.pvm"
[ -s "$PVM_DIR/pvm.sh" ] && . "$PVM_DIR/pvm.sh"
PVM_DIR
PVM_BIN
PVM_INC
PVM_VERSION
PVM_RC_VERSION
The following environment variables may affect Python version switching:
PYTHONHOME
PYTHONPATH
PIP_PREFIX
PIP_TARGET
VIRTUAL_ENV
If needed:
deactivate
pvm use 3.12
pvm deactivate
rm -rf ~/.pvm
Early development.
MIT License. See LICENSE.
