This post shows how to cross compile Python (using the [CPython][#cpython] implementation) for use on an armv7l chip. This can likely be extrapolated to other chip archetectures, but the proper cross-compilation toolchain would need to be substituded. The Python version utilized here is version 3.7.13. The driving force behind this effort was to get [python-can][#python-can] functional on an armv7l platform. This compilation process is done on a Ubuntu 20.04.4 LTS operating system. I have utilized various online references and will do my best to provide citation and links.
In my case the device with an armv7l chip contains a root file system and shared objects that are compiled using a version of [buildroot][#buildroot]. The buildroot
menu configuration allows for the selection of Python 3 for installation, but not all of the basic packages are included. For example, importing the python-can
package into an environment using Python 3 installed b