Skip to content

ImYourBoyRoy/pyenv-native

Repository files navigation

pyenv-native

Platforms Runtime PyPI License

A native-first, cross-platform Python version manager inspired by pyenv. Built for speed and reliability on Windows, Linux, and macOS.

pyenv-native is a native Rust reimplementation of the pyenv experience. It provides familiar workflows for version selection while removing shell and platform limitations, especially on Windows.


Current Status: Actively Maturing

pyenv-native is currently in active development. While it is used daily by its creators, it should be considered "production-intended" but still subject to community validation.

  • Windows: Stable (Primary platform)
  • Linux/macOS: Tested
  • Android/Termux: Experimental (Requires manual setup for compilation)
Android / Termux Build Prerequisites

Since Android/Termux does not ship with pre-built CPython binaries, pyenv-native automatically fetches and compiles Python from source. To prevent compilation failures, you must install the required compiler tools and system development libraries inside Termux first:

# 1. Update Termux package repositories
pkg update && pkg upgrade -y

# 2. Install required compilers, builders, and standard libraries
pkg install clang make pkg-config libffi openssl readline ncurses -y

After installing these prerequisites, running pyenv install <version> will compile and build your chosen Python runtime flawlessly on Android.


The Ecosystem

pyenv-native is more than a CLI; it is a native foundation for Python development.

The high-performance core. Manages Python installations, shims, and shell integration.

  • Native-First: No Bash dependency.

  • Opinionated Power: Built-in managed venv support (replaces pyenv-virtualenv).

  • Validated Performance: Reliable version selection on Windows, Linux, and macOS.

  • Dashboard: Live view of your managed environments.

  • Visual Control: Install versions and manage venvs with one click.

  • Status: Stable on Windows; Experimental on Linux/macOS.

GUI Standalone (Latest)

  • Windows: Download .exe
    • Note: You may need to Right-click -> Properties -> Unblock if Windows SmartScreen blocks execution.
  • Linux: Download Binary
  • macOS (Apple Silicon): Download Binary
  • macOS (Intel): Download Binary
    • Note: On Linux/macOS, run chmod +x <binary> in your terminal before launching.

A structured bridge for AI models like Claude or Gemini.

  • Standardized: Built-in MCP server support.
  • Model-Friendly: Allows AI agents to inspect, configure, and manage Python environments safely.

Installation

pyenv-native can be installed using modern package managers or standard interactive terminal scripts.

1. Package Managers (Recommended)

Platform Command Description
Windows (winget) winget install pyenv-native Direct, system-wide Windows installation
macOS / Linux (Homebrew) brew install imyourboyroy/pyenv-native/pyenv-native Universal Unix taps management
Universal (pipx) pipx install pyenv-native Isolated Python application bootstrap

Note

When installing via pipx, you will run the self-installer command immediately after package installation:

pyenv-native install --install-root ~/.pyenv

2. Interactive Shell Scripts (Fastest)

For single-line boots directly from standard terminal shells:

Windows (PowerShell)

irm https://github.com/imyourboyroy/pyenv-native/releases/latest/download/install.ps1 | iex

macOS / Linux / Android (Bash/Zsh)

curl -LsSf https://github.com/imyourboyroy/pyenv-native/releases/latest/download/install.sh | sh

Uninstallation

If you need to remove pyenv-native and its shims, you can use the native CLI or standard web scripts:

1. Native CLI (Self-Contained)

If pyenv is already in your PATH, simply run:

pyenv self-uninstall

2. Interactive Shell Scripts

Windows (PowerShell)

irm https://github.com/imyourboyroy/pyenv-native/releases/latest/download/uninstall.ps1 | iex

macOS / Linux (Bash/Zsh)

curl -LsSf https://github.com/imyourboyroy/pyenv-native/releases/latest/download/uninstall.sh | sh -s -- --remove-root

Documentation Registry

Detailed technical guides and instructions:


Visual Previews

CLI Environment

$ pyenv versions
  system
* 3.13.1 (set by C:\Users\Roy\.pyenv\version)
  3.12.8
  3.12.8/envs/api  (managed venv)

Categorized Help Reference

SELECTION:      global, local, shell, latest, version, version-name, prefix
PROVISIONING:   install, available, versions, uninstall
ENVIRONMENT:    venv (managed virtual environments)
INTERFACE:      init, gui, rehash, shims, prompt, exec, completions
DIAGNOSTICS:    doctor, status, config, root, which, whence
MAINTENANCE:    self-update, self-uninstall

GUI Dashboard

Pyenv-Native GUI Animation


Reporting Issues

If you encounter an issue, please open a GitHub Issue. To help us troubleshoot, please include:

  • OS Version (e.g., Windows 11, macOS Sequoia, Ubuntu 24.04)
  • Processor Architecture (e.g., x64, ARM64/Apple Silicon)
  • Shell (e.g., PowerShell 7, Bash, Zsh, Fish)
  • Relevant Logs (found in your .pyenv/logs/ directory)
  • Problematic Output (the full command and any error messages)

Tip

Run pyenv doctor to get a quick summary of your environment health if the CLI is already installed.


Relationship to pyenv

pyenv-native is an independent reimplementation inspired by the pyenv experience. It is not affiliated with or endorsed by the official pyenv project. We thank the pyenv maintainers for shaping the standard for Python version management.


Created by: Roy Dawson IV | GitHub | PyPI | License: MIT