Ubuntu 编译nodemcu 报的错

本文详细介绍了在使用esptool.py时遇到的ImportError问题,即未能找到serial模块。文章提供了详细的解决步骤,包括如何通过apt-get安装必要的软件包如gcc、python和python-pip,以及如何使用pip安装pyserial或serial模块来修复错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

../tools/esptool.py elf2image --flash_mode dio --flash_freq 40m .output/eagle/debug/image/eagle.app.v6.out -o ../bin/
Traceback (most recent call last):
  File "../tools/esptool.py", line 26, in <module>
    import serial
ImportError: No module named serial
../Makefile:202: recipe for target '.output/eagle/debug/bin/eagle.app.v6.bin' failed
make[1]: *** [.output/eagle/debug/bin/eagle.app.v6.bin] Error 1
make[1]: Leaving directory '/home/ubuntu/nodemcu-firmware/app'
Makefile:292: recipe for target '.subdirs' failed
make: *** [.subdirs] Error 2

错误原因:

没有serial模块

解决办法:

在这之前报错请先安装好

apt-get install gcc

apt-get install python

apt-get install python-pip

没有seria就安装呗。

pip install pyserial

或者

pip install serial

然后再make就可以了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值