diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
index 0e6ecf5..575bea1 100644
--- a/src/libcamera/meson.build
+++ b/src/libcamera/meson.build
@@ -77,6 +77,7 @@ if libudev.found()
     ])
 endif
 
+import('python').find_installation('python3', modules : ['yaml'])
 gen_controls = files('gen-controls.py')
 
 control_sources = []
