ZYNQ导入hdf文件报错

ZYNQ 导入hdf文件报错

petalinux-config --get-hw-description=…/
INFO: Getting hardware description…
INFO: Rename nv1951_top.hdf to system.hdf
[INFO] generating Kconfig for project
[INFO] menuconfig project

*** End of the configuration.
*** Execute ‘make’ to start the build or try ‘make help’.

[INFO] sourcing bitbake
ERROR: Failed to source bitbake
ERROR: Failed to config project.
ERROR: Get hw description Failed!.

查看build/config.log文件:
[INFO] sourcing bitbake
SDK environment now set up; additionally you may now run devtool to perform development tasks.
Run devtool --help for further details.
OpenEmbedded requires ‘python’ to be python v2 (>= 2.7.3), not python v3.
Please set up python v2 as your default ‘python’ interpreter.
ERROR: Failed to source bitbake

错误信息提示python版本不对,需要使用python2

  1. 查看系统安装python版本
    ls /usr/bin/python*
    在这里插入图片描述

  2. 查看python替换版本信息
    update-alternatives --list python
    如果出现 update-alternatives:error:no alternatives for python
    则表示Python 的替换版本尚未被update-alternatives 命令识别。想解决这个问题,我们需要更新一下替换版本,将Python2.7和python3.5放入其中。执行以下命令:
    sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
    sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.5 2
    sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.6 3

  3. 切换python版本
    update-alternatives --config python
    在这里插入图片描述输入“1”,就切换到2.7版本了,相反如果之前默认版本为2.7的输入“2”则切换到3.6版本了,输入0切换到3.5版本。

  4. 查看默认python版本
    python --version
    在这里插入图片描述重新执行导入hdf命令,正常执行。

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值