Skip to main content

detect_python_version

Function detect_python_version 

Source
pub fn detect_python_version(python_bin: &str) -> Option<PythonVersion>
Expand description

Detect the Python version from a binary by running python3 -c "import sys; ...".

Returns None if the binary cannot be found or version cannot be parsed.