A similar question was asked 3 years ago with no answers:
"ModuleNotFoundError: No module named 'zlib'” when I add python3 support with buildroot
And I have tried the comment that says to make clean
.
I am trying to build a custom linux image using buildroot for a beaglebone. I have packaged a python application using the requests library (which imports zlib) to run on target.
Everything is properly installed on target, however when trying to run the application or running the following in python itself:
import zlib
I get a:
"ModuleNotFoundError: No module named 'zlib'"
In my config I have:
BR2_PACKAGE_PYTHON3=y
BR2_PACKAGE_PYTHON_REQUESTS=y
and python_requests has a config.in with:
select BR2_PACKAGE_PYTHON3_ZLIB
I have tried adding zlib by itself in my config:
BR2_PACKAGE_PYTHON3_ZLIB=y
BR2_PACKAGE_ZLIB=y
And I have tried changing zlib provider to zlib-ng:
BR2_PACKAGE_PROVIDES_ZLIB="zlib-ng"
But I still get the same error.