OpenEmbedded Python Layer on i.MX8M Mini

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

OpenEmbedded Python Layer on i.MX8M Mini

跳至解决方案
2,988 次查看
david_ochs1
Contributor III

Hi,

I'm trying to use the smbus python module on the i.MX8M Mini Quad EVK. I'm using the fsl-image-validation image Yocto build. I have tried the python command import smbus from both python2 and python3 prompts, and it can't find it from either. When I try to install it with pip, I get the following:

Downloading https://files.pythonhosted.org/packages/4d/5c/70e14aa4f0c586efc017e1d1aa6e)
100% |################################| 112kB 1.2MB/s
Installing collected packages: smbus
Running setup.py install for smbus ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__fi:
running install
running build
running build_ext
building 'i2c' library
make: cc: Command not found
make: *** [lib/Module.mk:72: lib/smbus.o] Error 127

building 'smbus' extension
creating build
creating build/temp.linux-aarch64-2.7
aarch64-poky-linux-gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -fPIC -I/usr/e
unable to execute 'aarch64-poky-linux-gcc': No such file or directory
error: command 'aarch64-poky-linux-gcc' failed with exit status 1

Also, it looks like the open-embedded/meta-python layer, which includes smbus, is in my yocto project, which I thought would mean that the module would be installed for me:

$ bitbake-layers show-layers

NOTE: Starting bitbake server...
layer path priority
==========================================================================
meta /home/daveo/imx-yocto-bsp/sources/poky/meta 5
meta-poky /home/daveo/imx-yocto-bsp/sources/poky/meta-poky 5
meta-oe /home/daveo/imx-yocto-bsp/sources/meta-openembedded/meta-oe 6
meta-multimedia /home/daveo/imx-yocto-bsp/sources/meta-openembedded/meta-multimedia 6
meta-freescale /home/daveo/imx-yocto-bsp/sources/meta-freescale 5
meta-freescale-3rdparty /home/daveo/imx-yocto-bsp/sources/meta-freescale-3rdparty 4
meta-freescale-distro /home/daveo/imx-yocto-bsp/sources/meta-freescale-distro 4
meta-bsp /home/daveo/imx-yocto-bsp/sources/meta-fsl-bsp-release/imx/meta-bsp 8
meta-sdk /home/daveo/imx-yocto-bsp/sources/meta-fsl-bsp-release/imx/meta-sdk 8
meta-browser /home/daveo/imx-yocto-bsp/sources/meta-browser 7
meta-gnome /home/daveo/imx-yocto-bsp/sources/meta-openembedded/meta-gnome 7
meta-networking /home/daveo/imx-yocto-bsp/sources/meta-openembedded/meta-networking 5
meta-python /home/daveo/imx-yocto-bsp/sources/meta-openembedded/meta-python 7
meta-filesystems /home/daveo/imx-yocto-bsp/sources/meta-openembedded/meta-filesystems 6
meta-qt5 /home/daveo/imx-yocto-bsp/sources/meta-qt5 7

What am I missing here?

Thanks,

Dave

标签 (2)
0 项奖励
回复
1 解答
2,572 次查看
diegoadrian
NXP Employee
NXP Employee

Hello,

Could you please try adding the below configuration on the local.con file?

IMAGE_INSTALL_append = " python-smbus"

Hope this could solve your problem.

Best regards,

Diego.

在原帖中查看解决方案

0 项奖励
回复
1 回复
2,573 次查看
diegoadrian
NXP Employee
NXP Employee

Hello,

Could you please try adding the below configuration on the local.con file?

IMAGE_INSTALL_append = " python-smbus"

Hope this could solve your problem.

Best regards,

Diego.

0 项奖励
回复