import os import subprocess subprocess.run("which wkhtmltopdf", capture_output=True)