Cross-platform Python version checker and installer (does NOT modify system defaults)
Project description
Python Version Manager (pyvm)
A cross-platform CLI tool with an interactive TUI to check and install Python versions side-by-side with your existing installation.
Overview
pyvm provides a safe and convenient way to manage multiple Python versions on your system. It installs new versions alongside your existing Python without modifying system defaults, ensuring your system tools remain functional.
Documentation: Installation Guide | Quick Start | Quick Reference
Features
Interactive TUI
- Terminal interface with keyboard and mouse support
- Three-panel layout showing installed versions, available releases, and status
- Keyboard navigation with Tab, arrows, and shortcuts
- Live installation progress updates
- Theme switching between dark and light modes
CLI Features
- Check current Python version against latest stable release
- Install the latest Python or specific versions side-by-side
- List all available Python versions with support status
- Cross-platform support for Windows, Linux, and macOS
- Virtual environment management
- Configuration system for user preferences
Safety
- Never modifies system Python defaults
- SHA256 checksum verification for all downloads
- Smart installation using mise, pyenv, or system package managers
- Rollback support to undo installations
- Multiple Python versions coexist without conflicts
Installation
From PyPI (Recommended)
pip install --user pyvm-updater
From GitHub
git clone https://github.com/shreyasmene06/pyvm-updater.git
cd pyvm-updater
pip install --user .
Using pipx
pipx install pyvm-updater
Note: On newer Linux systems (Ubuntu 23.04+, Debian 12+), use the --user flag or pipx to avoid "externally-managed-environment" errors.
Verify Installation
pyvm --version
pyvm check
Quick Start
# Check your Python version
pyvm check
# Update to latest Python
pyvm update
# Launch interactive TUI
pyvm tui
# List available versions
pyvm list
# Install a specific version
pyvm install 3.12.8
Usage
Interactive TUI Mode
pyvm tui
Keyboard Shortcuts:
| Key | Action |
|---|---|
| Tab / Shift+Tab | Switch between panels |
| Arrow Keys | Navigate within panel |
| Enter | Install selected version |
| U | Update to latest Python |
| B | Rollback last installation |
| X | Remove selected version |
| R | Refresh data |
| T | Toggle theme |
| Q | Quit |
CLI Commands
| Command | Description |
|---|---|
pyvm check |
Check Python version against latest |
pyvm list |
List available Python versions |
pyvm list --all |
Show all versions including patches |
pyvm install <version> |
Install specific Python version |
pyvm update |
Update to latest Python version |
pyvm update --version 3.12.0 |
Update to specific version |
pyvm remove <version> |
Remove an installed version |
pyvm rollback |
Undo last installation |
pyvm venv create <name> |
Create virtual environment |
pyvm venv list |
List virtual environments |
pyvm config |
View configuration |
pyvm info |
Show system information |
Virtual Environment Management
# Create a new virtual environment
pyvm venv create myproject
# Create with specific Python version
pyvm venv create myproject --python 3.12
# List all managed environments
pyvm venv list
# Show activation command
pyvm venv activate myproject
# Remove an environment
pyvm venv remove myproject
Using Installed Python Versions
After installation, the new Python is available alongside your existing version:
Linux/macOS:
# Use the new version
python3.12 your_script.py
# Create a virtual environment
python3.12 -m venv myproject
source myproject/bin/activate
Windows:
# Use Python Launcher
py -3.12 your_script.py
# List installed versions
py --list
How It Works
pyvm uses an intelligent fallback chain for installation:
Linux:
- mise (if available)
- pyenv (if available)
- apt with deadsnakes PPA (Ubuntu/Debian)
- dnf/yum (Fedora/RHEL)
macOS:
- mise (if available)
- pyenv (if available)
- Homebrew
Windows:
- Downloads official installer from python.org
Configuration
Configuration is stored at ~/.config/pyvm/config.toml:
[general]
auto_confirm = false
verbose = false
preferred_installer = "auto"
[download]
verify_checksum = true
max_retries = 3
timeout = 120
[tui]
theme = "dark"
Manage configuration:
pyvm config # View current settings
pyvm config --init # Create default config
pyvm config --path # Show config file location
Requirements
- Python 3.9 or higher
- Internet connection
- Admin/sudo privileges for some package manager operations
Dependencies
Automatically installed:
- requests
- beautifulsoup4
- packaging
- click
- textual
Troubleshooting
"externally-managed-environment" Error
Use one of these solutions:
# Option 1: User install
pip install --user pyvm-updater
# Option 2: Use pipx
pipx install pyvm-updater
# Option 3: Use virtual environment
python3 -m venv venv && source venv/bin/activate
pip install pyvm-updater
"pyvm: command not found"
Add the installation directory to your PATH:
# For pip install --user
export PATH="$HOME/.local/bin:$PATH"
# For pipx
pipx ensurepath
"Already installed but shows old version"
The new Python is installed alongside your existing version. Use the specific version command:
python3.12 --version # Linux/macOS
py -3.12 --version # Windows
Development
# Clone and install in development mode
git clone https://github.com/shreyasmene06/pyvm-updater.git
cd pyvm-updater
pip install -e ".[dev]"
# Run tests
pytest tests/ -v
# Run linters
ruff check .
black --check .
mypy src/pyvm_updater
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success or up-to-date |
| 1 | Update available or error |
| 130 | Operation cancelled by user |
Contributing
Contributions are welcome. See CONTRIBUTING.md for guidelines.
License
MIT License. See LICENSE for details.
Author
Shreyas Mene
Disclaimer
This tool downloads and installs software from python.org. Always verify the authenticity of downloaded files. The authors are not responsible for any issues arising from Python installations.
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 pyvm_updater-2.2.0.tar.gz.
File metadata
- Download URL: pyvm_updater-2.2.0.tar.gz
- Upload date:
- Size: 34.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85704c552247b6aed6f7afe21b26afd68262ce5fde848f4ca9dc0817e3b6ca07
|
|
| MD5 |
29f2b4f2230b0aa798d92ab91692b0f4
|
|
| BLAKE2b-256 |
beaff7f4c5d8f859b339093c3f85fdc88c6be3eeb48bf92aab616208dd149488
|
Provenance
The following attestation bundles were made for pyvm_updater-2.2.0.tar.gz:
Publisher:
python-publish.yml on shreyasmene06/pyvm-updater
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyvm_updater-2.2.0.tar.gz -
Subject digest:
85704c552247b6aed6f7afe21b26afd68262ce5fde848f4ca9dc0817e3b6ca07 - Sigstore transparency entry: 829079701
- Sigstore integration time:
-
Permalink:
shreyasmene06/pyvm-updater@c7e94150f250266bb31da0739a7c0e9f6906bc2d -
Branch / Tag:
refs/tags/v2.2.0 - Owner: https://github.com/shreyasmene06
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@c7e94150f250266bb31da0739a7c0e9f6906bc2d -
Trigger Event:
release
-
Statement type:
File details
Details for the file pyvm_updater-2.2.0-py3-none-any.whl.
File metadata
- Download URL: pyvm_updater-2.2.0-py3-none-any.whl
- Upload date:
- Size: 32.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85168c3a8102bead04c5c72a4399f7226be72cb3fa63323e9c7682d9cd6f9169
|
|
| MD5 |
03550b9e609d2ea65bb835349f51f4b6
|
|
| BLAKE2b-256 |
02c5f89189c6476eb89034b906b33482818d361edd5fed0b99ebfb0ff8b58bc8
|
Provenance
The following attestation bundles were made for pyvm_updater-2.2.0-py3-none-any.whl:
Publisher:
python-publish.yml on shreyasmene06/pyvm-updater
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyvm_updater-2.2.0-py3-none-any.whl -
Subject digest:
85168c3a8102bead04c5c72a4399f7226be72cb3fa63323e9c7682d9cd6f9169 - Sigstore transparency entry: 829079703
- Sigstore integration time:
-
Permalink:
shreyasmene06/pyvm-updater@c7e94150f250266bb31da0739a7c0e9f6906bc2d -
Branch / Tag:
refs/tags/v2.2.0 - Owner: https://github.com/shreyasmene06
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@c7e94150f250266bb31da0739a7c0e9f6906bc2d -
Trigger Event:
release
-
Statement type: