环境:window 10
IDF版本:4.3
使用命令行编译
使用esp32c3跑接入阿里物联平台的例程:https://github.com/espressif/esp-aliyun
在配置三元组信息,编译nvs配置bin时,报错
D:\03-code\esp32c3-aliyun-iot\esp-aliyun\config\mass_mfg>E:\esp-idf\components\nvs_flash\nvs_partition_generator\nvs_partition_gen.py --input my_single_mfg_config.csv my_single_mfg.bin --size 0x4000
Traceback (most recent call last):
File "E:\esp-idf\components\nvs_flash\nvs_partition_generator\nvs_partition_gen.py", line 34, in <module>
from builtins import bytes, int, range
ImportError: No module named builtins
然后在pip按照future时遇到问题
D:\03-code\esp32c3-aliyun-iot\esp-aliyun\config\mass_mfg>pip install future
Requirement already satisfied: future in c:\users\106279\.espressif\python_env\idf4.3_py3.8_env\lib\site-packages (0.18.2)
使用指定按照目录后还是有问题。
D:\03-code\esp32c3-aliyun-iot\esp-aliyun\config\mass_mfg>pip install --target=c:\users\106279\.espressif\python_env\idf4.3_py3.8_env\lib\site-packages future
Collecting future
Using cached future-0.18.2-py3-none-any.whl
Installing collected packages: future
Successfully installed future-0.18.2
WARNING: Target directory c:\users\106279\.espressif\python_env\idf4.3_py3.8_env\lib\site-packages\future already exists. Specify --upgrade to force replacement.
WARNING: Target directory c:\users\106279\.espressif\python_env\idf4.3_py3.8_env\lib\site-packages\future-0.18.2.dist-info already exists. Specify --upgrade to force replacement.
WARNING: Target directory c:\users\106279\.espressif\python_env\idf4.3_py3.8_env\lib\site-packages\libfuturize already exists. Specify --upgrade to force replacement.
WARNING: Target directory c:\users\106279\.espressif\python_env\idf4.3_py3.8_env\lib\site-packages\libpasteurize already exists. Specify --upgrade to force replacement.
WARNING: Target directory c:\users\106279\.espressif\python_env\idf4.3_py3.8_env\lib\site-packages\past already exists. Specify --upgrade to force replacement.
WARNING: Target directory c:\users\106279\.espressif\python_env\idf4.3_py3.8_env\lib\site-packages\bin already exists. Specify --upgrade to force replacement.
请问此处该如何解决?
[已解决] ESP32C3- 编译nvs配置文件时出错:ImportError: No module named builtins
-
- Posts: 3
- Joined: Thu Aug 26, 2021 9:34 am
[已解决] ESP32C3- 编译nvs配置文件时出错:ImportError: No module named builtins
Last edited by stonetower on Fri Aug 27, 2021 2:36 am, edited 1 time in total.
-
- Posts: 3
- Joined: Thu Aug 26, 2021 9:34 am
Re: ESP32C3- 编译nvs配置文件时出错:ImportError: No module named builtins
仔细查看了esp32c3的文档后,发现可能是命令使用有误。
idf4.3的命令如下(https://docs.espressif.com/projects/esp ... tition_gen)
运行后可以生产bin文件了
D:\03-code\esp32c3-aliyun-iot\esp-aliyun\config\mass_mfg>python E:\esp-idf\components\nvs_flash\nvs_partition_generator\nvs_partition_gen.py generate my_single_mfg_config.csv sample.bin 0x4000
Creating NVS binary with version: V2 - Multipage Blob Support Enabled
Created NVS binary: ===> D:\03-code\esp32c3-aliyun-iot\esp-aliyun\config\mass_mfg\sample.bin
idf4.3的命令如下(https://docs.espressif.com/projects/esp ... tition_gen)
Code: Select all
python nvs_partition_gen.py generate sample_singlepage_blob.csv sample.bin 0x3000
D:\03-code\esp32c3-aliyun-iot\esp-aliyun\config\mass_mfg>python E:\esp-idf\components\nvs_flash\nvs_partition_generator\nvs_partition_gen.py generate my_single_mfg_config.csv sample.bin 0x4000
Creating NVS binary with version: V2 - Multipage Blob Support Enabled
Created NVS binary: ===> D:\03-code\esp32c3-aliyun-iot\esp-aliyun\config\mass_mfg\sample.bin
Who is online
Users browsing this forum: No registered users and 49 guests