A cross-platform CLI tool to check and install the latest Python version side-by-side with your existing Python.
If you're using v1.2.0 or earlier: Please update immediately!
Previous versions contained system-breaking code that could freeze Linux systems. v1.2.1 is completely safe - it only installs Python, never modifies system defaults.
# Update to the safe version
cd pyvm-updater
git pull
pip install --user -e .See docs/CRITICAL_SECURITY_FIX_v1.2.1.md for details and recovery instructions.
📚 Documentation: Installation Guide | Quick Start | Quick Reference
# 1. Install the package
pip install --user pyvm-updater
# 2. Use it!
pyvm check # Check your Python version
pyvm update # Update to latest PythonThat's it! 🎉
- ✅ Check your current Python version against the latest stable release
- 🔄 Install the latest Python side-by-side with your existing version
- 🖥️ Cross-platform support (Windows, Linux, macOS)
- 📊 Detailed system information display
- 🚀 Simple and intuitive CLI interface
- 🛡️ SAFE: Never modifies your system Python defaults
- 🔧 Multiple Python versions coexist peacefully
- 📚 Clear instructions on how to use the new version
# Clone from GitHub
git clone https://github.com/shreyasmene06/pyvm-updater.git
cd pyvm-updater# Install with pip (recommended)
pip install --user .That's it! All dependencies are automatically installed. 🎉
# Check if it works
pyvm --version
pyvm check# Clone the repository
git clone https://github.com/shreyasmene06/pyvm-updater.git
cd pyvm-updater
# Install
pip install --user .pip install --user pyvm-updaterNote for Linux users: On newer systems (Ubuntu 23.04+, Debian 12+), use --user flag or see troubleshooting if you get "externally-managed-environment" error.
# Install pipx if you don't have it
sudo apt install pipx # Ubuntu/Debian
# or: brew install pipx # macOS
# Install pyvm-updater
pipx install pyvm-updater
# If pyvm command not found, add to PATH:
pipx ensurepath
# Then restart your terminal or run:
source ~/.bashrc # or source ~/.zshrcWhy pipx? It automatically manages virtual environments for CLI tools, preventing conflicts.
# Clone the repository
git clone https://github.com/shreyasmene06/pyvm-updater.git
cd pyvm-updater
# Optional: Check system requirements first
python3 check_requirements.py
# Install in editable mode
pip install --user .Note: If you get permission errors, use pip install --user . instead of pip install .
This will automatically install all required dependencies:
- requests
- beautifulsoup4
- packaging
- click
The pyvm command will be available globally after installation.
If you're using Anaconda/Miniconda, the pyvm update command will install the latest Python to your system, but your Anaconda environment will continue using its own Python version. This is expected behavior!
How to check:
# Your Anaconda Python (won't change)
python --version
# The newly installed system Python
python3.14 --version # (or whatever the latest version is)To use the updated Python:
- Use it directly:
python3.14 your_script.py - Create a new environment:
python3.14 -m venv myenv - Or continue using Anaconda (recommended for data science work)
Why does this happen? Anaconda manages its own Python installation separately from system Python. This is actually good because it prevents conflicts between your Anaconda packages and system packages.
For detailed installation instructions, see INSTALL.md
Simply run the tool to check your Python version:
pyvm
# or
pyvm checkOutput example:
Checking Python version... (Current: 3.12.3)
========================================
Python Version Check Report
========================================
Your version: 3.12.3
Latest version: 3.14.0
========================================
⚠ A new version (3.14.0) is available!
💡 Tip: Run 'pyvm update' to upgrade Python
Update to the latest version:
pyvm updateFor automatic installation without confirmation:
pyvm update --autoIMPORTANT: This command installs Python side-by-side. Your system Python remains unchanged.
Once installation completes, the new Python is available side-by-side with your existing version:
Linux/macOS:
# Your old Python (unchanged)
python3 --version # Shows: Python 3.10.x (or whatever you had)
# Your new Python (side-by-side)
python3.12 --version # Shows: Python 3.12.x
# Use the new Python for a script
python3.12 your_script.py
# Create a virtual environment with the new Python
python3.12 -m venv myproject
source myproject/bin/activate
python --version # Now shows 3.12.x in this venvWindows:
# List all Python versions
py --list
# Use specific version
py -3.12 your_script.py
# Create virtual environment
py -3.12 -m venv myproject
myproject\Scripts\activateWhy doesn't python3 automatically use the new version?
This is intentional and safe! Your system tools (package managers, system utilities) depend on the Python version they were built with. Changing the default could break them. The tool gives you the new Python to use when YOU choose, without risking your system.
pyvm infoOutput example:
==================================================
System Information
==================================================
Operating System: Linux
Architecture: amd64
Python Version: 3.12.3
Python Path: /usr/bin/python3
Platform: Linux-5.15.0-generic-x86_64
Admin/Sudo: No
==================================================
pyvm --versionAfter installation, you have multiple Python versions side-by-side. Here's how to use them effectively:
# Your system Python (unchanged)
python3 --version # Shows: Python 3.10.x
# Your new Python (side-by-side)
python3.12 --version # Shows: Python 3.12.x
# See all installed versions
ls /usr/bin/python* | grep -E 'python[0-9]'This is the safest and most flexible approach:
# Create project with new Python
python3.12 -m venv myproject
source myproject/bin/activate
# Now you're using the new Python in this project
python --version # Shows: Python 3.12.x
pip install -r requirements.txt
# Deactivate when done
deactivateBenefits:
- ✅ Isolated dependencies per project
- ✅ No system modifications
- ✅ Easy to switch between Python versions
- ✅ No risk of breaking system tools
Always specify which version you want:
# Run scripts with new Python
python3.12 your_script.py
# Install packages for new Python
python3.12 -m pip install requestsChanging your system's default Python can break system tools. If you still want to:
# Manually configure (at your own risk)
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1
sudo update-alternatives --config python3We do NOT recommend this approach. Virtual environments are much safer.
This is the safest approach as it doesn't change system behavior.
Windows Python Launcher (py) handles multiple versions automatically:
# Use specific version
py -3.14 your_script.py
# List all versions
py --list
# Set default in py.ini (optional)
# Create/edit: C:\Windows\py.ini
# Add: [defaults]
# python=3.14- Downloads the official Python installer (.exe)
- Runs the installer interactively
- Recommendation: Check "Add Python to PATH" during installation
- Uses system package managers (apt, yum, dnf)
- May require
sudoprivileges - For Ubuntu/Debian: Uses deadsnakes PPA for latest versions
- Alternative: Install pyenv for easier version management
- Uses Homebrew if available
- Falls back to official installer download link
- Run
brew install python@3.xfor Homebrew installation
- Python 3.7 or higher
- Internet connection
- Admin/sudo privileges (for updates on some systems)
requests- HTTP librarybeautifulsoup4- HTML parsingpackaging- Version comparisonclick- CLI framework
| Command | Description |
|---|---|
pyvm |
Check Python version (default) |
pyvm check |
Check Python version |
pyvm update |
Update Python to latest version |
pyvm update --auto |
Update without confirmation |
pyvm update --set-default |
Update and set as system default (Linux) |
pyvm update --auto --set-default |
Fully automated update and setup (Linux) |
pyvm set-default |
List available Python versions (Linux) |
pyvm set-default 3.12 |
Set Python 3.12 as system default (Linux) |
pyvm info |
Show system information |
pyvm --version |
Show tool version |
pyvm --help |
Show help message |
0- Success or up-to-date1- Update available or error occurred130- Operation cancelled by user (Ctrl+C)
Error message:
error: externally-managed-environment
× This environment is externally managed
This is a security feature on newer Linux systems (Ubuntu 23.04+, Debian 12+) that prevents breaking system Python packages.
Solutions:
Option 1: Use --user flag (Recommended)
pip install --user pyvm-updaterOption 2: Use pipx (Best for CLI tools)
# Install pipx first
sudo apt install pipx
# Install pyvm-updater with pipx
pipx install pyvm-updaterOption 3: Use a virtual environment
python3 -m venv myenv
source myenv/bin/activate
pip install pyvm-updaterOption 4: Override (NOT recommended)
pip install --break-system-packages pyvm-updater # ⚠️ Not recommendedThe installation directory is not in your PATH.
If you installed with pip install --user:
# Add to your ~/.bashrc or ~/.zshrc
export PATH="$HOME/.local/bin:$PATH"
# Then reload your shell
source ~/.bashrc # or source ~/.zshrcIf you installed with pipx:
# Add pipx bin directory to PATH
pipx ensurepath
# Then restart your terminal OR reload:
source ~/.bashrc # for bash
source ~/.zshrc # for zshAfter running pipx ensurepath, you should see a message that PATH was updated. Restart your terminal to apply changes.
Windows:
- Add
C:\Users\YourName\AppData\Local\Programs\Python\Python3xx\Scriptsto PATH - Or restart your terminal/command prompt
If you're using Anaconda, see the Special Note for Anaconda Users section above.
For regular users, check which Python is being used:
which python3 # Linux/macOS
where python # WindowsThis happens with Anaconda. Use this instead:
pip install --user . # Instead of: pip install --user -e .The difference:
pip install .- Regular installation (recommended)pip install -e .- Editable/development mode (may conflict with Anaconda)
If you get import errors, install dependencies manually:
pip install requests beautifulsoup4 packaging clickSome operations require elevated privileges:
sudo pyvm update- Make sure you have administrator privileges
- Temporarily disable antivirus if installer is blocked
- Download manually from https://www.python.org/downloads/
This is normal! The new Python is installed alongside your old version:
# Check all installed Python versions
ls /usr/bin/python* # Linux/macOS
py --list # Windows
# Use the new version specifically
python3.14 --version # Linux/macOS
py -3.14 --version # WindowsWant to make the new Python your default? See the detailed guide: Making Updated Python the Default
To set up for development:
# Clone or navigate to the project
cd /home/shreyasmene06/coding/sideProjects
# Install in editable mode
pip install -e .
# Run tests (if available)
python -m pytestMIT License - Feel free to use and modify
Contributions are welcome! Please feel free to submit a Pull Request.
Created with ❤️ for the Python community
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.