petalinux-config报错:“ERROR: generating meta-plnx-generated layer”

petalinux版本是2019.01。
petalinux-config --get-hw-description=../hsi
时提示:

INFO: Getting hardware description...
INFO: Rename design_1_wrapper.hdf to system.hdf
[INFO] generating Kconfig for project
[INFO] menuconfig project
configuration written to /home/jason/Learn/Edge-AI-Platform-Tutorials/docs/DPU-Integration/reference-files/petalinux/project-spec/configs/config
*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

[INFO] sourcing bitbake
[INFO] generating plnxtool conf
[INFO] generating meta-plnx-generated layer
ERROR: Failed to generate meta-plnx-generated layer
ERROR: Failed to config project.
ERROR: Get hw description Failed!.

查看build/config.log,提示:

[INFO] generating plnxtool conf
[INFO] generating meta-plnx-generated layer
  File "genprop.py", line 40
    print "\tINFO:"+conf+" not define in system config"
                  ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("\tINFO:"+conf+" not define in system config")?
ERROR: Failed to generate meta-plnx-generated layer

看上去是python版本的问题。
xilinx forum上也有相应的帖子
以及这篇帖子
因此,问题原因是petalinux-config不支持python3
解决方法有两种:

  1. 修改~/.bashrc中的export,去掉anaconda3,让python默认的链接是python2.7;
  2. 用conda或virtualenv创建一个python2.7的虚拟环境,在这个环境下使用python2.7:
conda create --name petalinux python=2.7
conda activate petalinux
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值