findpython

0.7.1 · active · verified Sat Mar 28

findpython is a Python utility library designed to locate various Python versions installed on your system. It is a modern rewrite of the `pythonfinder` project, simplifying the codebase while retaining core functionality. The current version is 0.7.1, and the project maintains an active release cadence with frequent bug fixes and feature enhancements.

Warnings

Install

Imports

Quickstart

This example demonstrates how to find all installed Python versions and how to search for a specific major and minor version using the `findpython` library.

import findpython

# Find all Python versions on the system
pythons = findpython.find_pythons()
for p in pythons:
    print(f"Found Python: {p.executable} (Version: {p.major}.{p.minor}.{p.patch}, 64bit: {p.is_64bit})")

# Find a specific Python version (e.g., Python 3.9)
py39 = findpython.find_python(3, 9)
if py39:
    print(f"Found Python 3.9: {py39.executable}")
else:
    print("Python 3.9 not found.")

view raw JSON →