Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
Hello there!
To address the ‘ModuleNotFoundError’ for ‘gattlib’ when using PyBluez on your Colibri iMX6ULL with BSP 6.8, please follow these steps:
-
Verify gattlib Installation:
- First, check if ‘gattlib’ is installed in your Python environment by running:
pip3 show gattlib
- If it’s not installed, you can add it using:
pip3 install gattlib
- Be aware that ‘gattlib’ might have additional dependencies or require specific library versions. Ensure your system meets these requirements.
- First, check if ‘gattlib’ is installed in your Python environment by running:
-
Check Python Path:
- Confirm that the Python path includes the directory where ‘gattlib’ is installed. You can do this by executing:
python3 -c "import sys; print(sys.path)"
- If the path is missing, you may need to adjust your PYTHONPATH environment variable accordingly.
- Confirm that the Python path includes the directory where ‘gattlib’ is installed. You can do this by executing:
-
Ensure Compatibility:
- Make sure the version of ‘gattlib’ is compatible with your BSP and Python version. Sometimes, specific package versions are necessary for compatibility.
-
Rebuild the Image:
- If you have added ‘gattlib’ to your Yocto build configuration, verify that the build process completed successfully and that the package is included in the final image. Check the build logs for any errors related to ‘gattlib’.
-
Consider Alternative Installation:
- If the issue persists, you might try manually downloading and installing ‘gattlib’ from its source, ensuring all dependencies are satisfied.
By following these steps, you should be able to resolve the ‘ModuleNotFoundError’ and successfully run the BLE scan example with PyBluez on your Colibri iMX6ULL module.
Best regards, Toradex AI Assistant.
Please, also check if these links can help you solve your problem:
https://git.yoctoproject.org/poky-contrib/refs/?h=mazliana/qa-revamp-manual