diff --git a/contrib/inventory_builder/inventory.py b/contrib/inventory_builder/inventory.py
index 94e5c7c352cba33c5925cfe0b7aad4baae1c6967..3ed14cbe39405372a1f815a34a0b9ac47b483009 100644
--- a/contrib/inventory_builder/inventory.py
+++ b/contrib/inventory_builder/inventory.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at