pybind11_include#

scikitplot.cython.pybind11_include()[source]#

Return the pybind11 include directory, or None if not installed.

Returns:
pathlib.Path or None

Absolute path to the pybind11 headers, or None when pybind11 is not importable.

Return type:

Path | None

Notes

Scenario 4 / 3 user note: pass the result to include_dirs:

inc = pybind11_include()
if inc is None:
    raise ImportError("pip install pybind11")
result = compile_and_load(code, include_dirs=[inc])

Examples

>>> p = pybind11_include()
>>> p is None or p.is_dir()
True