jordansissel/fpm · error · FPM::Util::ExecutableNotFound
Could not find any python interpreter. Tried the following:
Error message
Could not find any python interpreter. Tried the following: #{pythons.join(", ")} What it means
Error "Could not find any python interpreter. Tried the following: #{pythons.join(", ")}" thrown in jordansissel/fpm.
Source
Thrown at lib/fpm/package/python.rb:373
path_to_package = ::Dir.glob(build_path("*.whl")).first
if path_to_package.nil?
raise FPM::InvalidPackageConfiguration, "Failed building python package format - fpm tried to build a python wheel, but didn't find the .whl file. This might be a bug in fpm."
end
end
load_package_info(path_to_package)
install_to_staging(path_to_package)
end # def input
def explore_environment
if !attributes[:python_bin_given?]
# If --python-bin isn't set, try to find a good default python executable path, because it might not be "python"
pythons = [ "python", "python3", "python2" ]
default_python = pythons.find { |py| program_exists?(py) }
if default_python.nil?
raise FPM::Util::ExecutableNotFound, "Could not find any python interpreter. Tried the following: #{pythons.join(", ")}"
end
logger.info("Setting default python executable", :name => default_python)
attributes[:python_bin] = default_python
if !attributes[:python_package_name_prefix_given?]
attributes[:python_package_name_prefix] = default_python
logger.info("Setting package name prefix", :name => default_python)
end
end
if attributes[:python_internal_pip?]
# XXX: Should we detect if internal pip is available?
attributes[:python_pip] = [ attributes[:python_bin], "-m", "pip"]
end
end # explore_environment
View on GitHub (pinned to b6d77ba72a)
When it happens
Trigger: Thrown at lib/fpm/package/python.rb:373 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of jordansissel/fpm@b6d77ba72a (2026-08-21).
Data as JSON: /api/errors/0fd2fc505c42685f.
Report an issue: GitHub.