Loading...
Loading...
ModuleNotFoundError: No module named 'jsonschema'The 'jsonschema' module is missing from your Python environment. This error has recently gained visibility in Linux kernel self-test logs (specifically on Ubuntu/Canonical mainline builds) where the kselftest script requires JSON validation logic to parse test results.
Install the package using pip in your current environment.
pip install jsonschemaIf you are fixing this for a Linux kernel build or system-level script, use the system package manager.
sudo apt-get update
sudo apt-get install python3-jsonschemaIf this error occurs during 'make kselftest', ensure the build-dependency is present in your build-chroot.
While often seen as a minor dependency error, the No module named 'jsonschema' failure in the Linux Kernel context points to a shift towards structured data in kernel testing. As of 2026, many kernel subsystems utilize JSON for test metadata.
Recent reports (like the one on /r/linuxquestions) highlight that Ubuntu's mainline kernel self-tests sometimes fail because the testing environment lacks this specific Python dependency. Even a 'small' bug like a missing Python package can disrupt the 'amd64/self-tests' suite, leading to the rc=2 exit code seen in official logs.
If you are building AI agents that process structured data, 'jsonschema' is mandatory. Always include it in your requirements.txt or pyproject.toml to avoid drift between dev and production environments.