PX4 SITL Build Fails Due to Missing kconfiglib in Externally-Managed Python Environment

I have retried my command with --force.

• I ran brew update-reset && brew update and retried my command.

• I ran brew doctor, fixed as many issues as possible, and retried my command.

• I confirmed that this is not a checksum/sha256 mismatch error.

Description of Issue:

When attempting to build PX4 SITL (using jmavsim) from the Firmware repository, the build fails because the required Python module menuconfig is not found. The error indicates that kconfiglib is either not installed or not in PATH. However, trying to install kconfiglib using pip fails with an “externally-managed-environment” error, preventing system-wide installation.

Command that Failed:

• Building PX4 SITL:make px4_sitl jmavsim

Attempting to install kconfiglib:pip3 install kconfiglib

– PX4_GIT_TAG: v1.16.0-beta1-45-gddb9a5d0b9
CMake Warning (dev) at CMakeLists.txt:176 (find_package):
Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
are removed. Use -Wno-dev to suppress this warning.
– Found PythonInterp: /opt/homebrew/bin/python3 (found suitable version “3.13.2”, minimum required is “3”)
– PX4 config file: /Users/onitsukaryo/Developer/Firmware/boards/px4/sitl/default.px4board
Traceback (most recent call last):
File “”, line 1, in
import menuconfig
ModuleNotFoundError: No module named ‘menuconfig’
CMake Error at cmake/kconfig.cmake:6 (message):
kconfiglib is not installed or not in PATH

please install using “pip3 install kconfiglib”

Call Stack (most recent call first):
CMakeLists.txt:191 (include)

I am using an Apple Silicon (ARM) Mac with macOS [insert your version].
• The Python interpreter used is located at /opt/homebrew/bin/python3 (version 3.13.2).
• I am building from the cloned PX4 Firmware repository (branch/tag: v1.16.0-beta1-45-gddb9a5d0b9).
• The build fails because the system-managed Python environment prevents installing kconfiglib, as the pip installation fails with an “externally-managed-environment” error.
• I attempted to follow the pip error’s recommendation by creating a virtual environment, but I would like to know if using a virtual environment is the intended solution or if an alternative workaround exists for installing kconfiglib in this context.

Please let me know if further details are required. Thank you for your assistance!