Skip to main content

python-discovery

PyPI Supported Python versions Downloads check Documentation Status

What is python-discovery?

python-discovery is a library for discovering Python interpreters installed on your machine. You may have multiple Python versions from system packages, pyenv, mise, asdf, uv, or the Windows registry (PEP 514). This library finds the right one for you.

Give it a requirement like python3.12 or >=3.11,<3.13, and it searches all known locations, verifies each candidate, and returns detailed metadata about the match. Results are cached to disk so repeated lookups are fast.

The library runs on Python 3.9+ and discovers interpreters as old as Python 3.6; anything older is skipped with a warning naming the version it found.

Usage

from pathlib import Path

from python_discovery import DiskCache, get_interpreter

cache = DiskCache(root=Path("~/.cache/python-discovery").expanduser())
result = get_interpreter("python3.12", cache=cache)
if result is not None:
    print(result.executable)  # /usr/bin/python3.12
    print(result.implementation)  # CPython
    print(result.version_info[:3])  # (3, 12, 1)

The get_interpreter() function accepts various specification formats:

  • Absolute path: /usr/bin/python3.12
  • Version: 3.12
  • Implementation prefix: cpython3.12
  • Version specifier: >=3.10, >=3.11,<3.13

Documentation

Full documentation is available at python-discovery.readthedocs.io

Metadata

Release files for python-discovery 1.6.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-discovery 1.6.4
File Size Uploaded
python_discovery-1.6.4.tar.gz 89.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for python-discovery 1.6.4
File Interpreter ABI Platform
python_discovery-1.6.4-py3-none-any.whl Python 3 none any Details

Total release size: 129.3 kB

Release files / python_discovery-1.6.4.tar.gz

Download URL python_discovery-1.6.4.tar.gz
Size 89.9 kB
Tags Source
SHA-256 checksum
How to use checksums
bc70d31f0ec5de11eda13d4d64c16e24b3506a65984684f2b6c98cb83b2ea9df
BLAKE2b-256 checksum
How to use checksums
f3eecf608372c88ce2c136ee13c69ab6f667dbc0d0c1176af188b4ddc8853e66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / python_discovery-1.6.4-py3-none-any.whl

Download URL python_discovery-1.6.4-py3-none-any.whl
Size 39.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
530179cc51a1816d512b15635b3dc931295ae12efb183783ad31190a5d425d2b
BLAKE2b-256 checksum
How to use checksums
60911aa70d3dfcab0dbcf88a2cbc3bce7f7c69562287a90216e617eaa4937e25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.6.4 This release

2 release files

1.6.3

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.3

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.4

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page