『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 776|回复: 3

[技术探讨] 求助Windows11安装新版esphome,编译时出错,求老师指点!!

[复制链接]

3

主题

33

帖子

177

积分

注册会员

Rank: 2

积分
177
金钱
144
HASS币
0
发表于 2024-4-6 23:33:32 | 显示全部楼层 |阅读模式
本帖最后由 graydot 于 2024-4-6 23:33 编辑

菜鸟求助!!哪位老师帮忙指导一下,看看我这个情况应该怎么解决??
笔记本电脑Windows11系统,安装版本python3.11.1,,esphome 2024.3.1,,PlatformIO Core 6.1.13,科学上网

web下和DOS命令行下运行编译固件,始终提示FAILED,英文水平太差,自己理解应该是找不到相应的工具或库文件,尝试更换环境版本,python3.8,esphome2023和多种魔法等也都是这个情况,ESP32和S3等所有设备也都是这个情况,同样的yaml,在群晖docker下的ESPhome就可以正常编译。1年前在电脑上安装过esphome,记得当时的情况是PC上可以顺利编译,群晖里的经常失败(没有魔法)。
log如下:
INFO ESPHome 2024.3.1
INFO Reading configuration config/esp32.yaml...
WARNING GPIO12 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Generating C++ source...
INFO Compiling app...
********************************************************************************
Obsolete PIO Core v6.1.13 is used (previous was 6.1.14)
Please remove multiple PIO Cores from a system:
https://docs.platformio.org/en/latest/core/installation/troubleshooting.html
********************************************************************************
Processing esp32 (board: esp32dev; framework: arduino; platform: platformio/[email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
Dependency Graph
|-- AsyncTCP-esphome @ 2.1.3
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.1.0
|-- DNSServer @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- noise-c @ 0.1.4
|-- ArduinoJson @ 6.18.5
|-- FastLED @ 3.3.2
Compiling .pioenvs\esp32\libe63\FastLED\FastLED.cpp.o
Compiling .pioenvs\esp32\libe63\FastLED\bitswap.cpp.o
Compiling .pioenvs\esp32\libe63\FastLED\colorpalettes.cpp.o
Compiling .pioenvs\esp32\libe63\FastLED\colorutils.cpp.o
Compiling .pioenvs\esp32\libe63\FastLED\hsv2rgb.cpp.o
Compiling .pioenvs\esp32\libe63\FastLED\lib8tion.cpp.o
In file included from .piolibdeps/esp32/FastLED/FastLED.h:41,
                 from .piolibdeps/esp32/FastLED/FastLED.cpp:2:
.piolibdeps/esp32/FastLED/led_sysdefs.h:48:10: fatal error: Arduino.h: No such file or directory

*****************************************************************
* Looking for Arduino.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:Arduino.h"
* Web  > https://registry.platformio.org/search?q=header:Arduino.h
*
*****************************************************************

 #include <Arduino.h>
          ^~~~~~~~~~~
compilation terminated.
In file included from .piolibdeps/esp32/FastLED/FastLED.h:41,
                 from .piolibdeps/esp32/FastLED/bitswap.cpp:2:
.piolibdeps/esp32/FastLED/led_sysdefs.h:48:10: fatal error: Arduino.h: No such file or directory

*****************************************************************
* Looking for Arduino.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:Arduino.h"
* Web  > https://registry.platformio.org/search?q=header:Arduino.h
*
*****************************************************************

 #include <Arduino.h>
          ^~~~~~~~~~~
compilation terminated.
Compiling .pioenvs\esp32\libe63\FastLED\noise.cpp.o
In file included from .piolibdeps/esp32/FastLED/FastLED.h:41,
                 from .piolibdeps/esp32/FastLED/colorpalettes.cpp:4:
.piolibdeps/esp32/FastLED/led_sysdefs.h:48:10: fatal error: Arduino.h: No such file or directory

*****************************************************************
* Looking for Arduino.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:Arduino.h"
* Web  > https://registry.platformio.org/search?q=header:Arduino.h
*
*****************************************************************

 #include <Arduino.h>
          ^~~~~~~~~~~
compilation terminated.
*** [.pioenvs\esp32\libe63\FastLED\FastLED.cpp.o] Error 1
Compiling .pioenvs\esp32\libe63\FastLED\power_mgt.cpp.o
*** [.pioenvs\esp32\libe63\FastLED\bitswap.cpp.o] Error 1
*** [.pioenvs\esp32\libe63\FastLED\colorpalettes.cpp.o] Error 1
In file included from .piolibdeps/esp32/FastLED/FastLED.h:41,
                 from .piolibdeps/esp32/FastLED/colorutils.cpp:7:
.piolibdeps/esp32/FastLED/led_sysdefs.h:48:10: fatal error: Arduino.h: No such file or directory

*****************************************************************
* Looking for Arduino.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:Arduino.h"
* Web  > https://registry.platformio.org/search?q=header:Arduino.h
*
*****************************************************************

 #include <Arduino.h>
          ^~~~~~~~~~~
compilation terminated.
*** [.pioenvs\esp32\libe63\FastLED\colorutils.cpp.o] Error 1
In file included from .piolibdeps/esp32/FastLED/FastLED.h:41,
                 from .piolibdeps/esp32/FastLED/hsv2rgb.cpp:4:
.piolibdeps/esp32/FastLED/led_sysdefs.h:48:10: fatal error: Arduino.h: No such file or directory

*****************************************************************
* Looking for Arduino.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:Arduino.h"
* Web  > https://registry.platformio.org/search?q=header:Arduino.h
*
*****************************************************************

 #include <Arduino.h>
          ^~~~~~~~~~~
compilation terminated.
In file included from .piolibdeps/esp32/FastLED/FastLED.h:41,
                 from .piolibdeps/esp32/FastLED/lib8tion.cpp:3:
.piolibdeps/esp32/FastLED/led_sysdefs.h:48:10: fatal error: Arduino.h: No such file or directory

*****************************************************************
* Looking for Arduino.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:Arduino.h"
* Web  > https://registry.platformio.org/search?q=header:Arduino.h
*
*****************************************************************

 #include <Arduino.h>
          ^~~~~~~~~~~
compilation terminated.
*** [.pioenvs\esp32\libe63\FastLED\hsv2rgb.cpp.o] Error 1
*** [.pioenvs\esp32\libe63\FastLED\lib8tion.cpp.o] Error 1
In file included from .piolibdeps/esp32/FastLED/FastLED.h:41,
                 from .piolibdeps/esp32/FastLED/noise.cpp:2:
.piolibdeps/esp32/FastLED/led_sysdefs.h:48:10: fatal error: Arduino.h: No such file or directory

*****************************************************************
* Looking for Arduino.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:Arduino.h"
* Web  > https://registry.platformio.org/search?q=header:Arduino.h
*
*****************************************************************

 #include <Arduino.h>
          ^~~~~~~~~~~
compilation terminated.
*** [.pioenvs\esp32\libe63\FastLED\noise.cpp.o] Error 1
In file included from .piolibdeps/esp32/FastLED/FastLED.h:41,
                 from .piolibdeps/esp32/FastLED/power_mgt.cpp:2:
.piolibdeps/esp32/FastLED/led_sysdefs.h:48:10: fatal error: Arduino.h: No such file or directory

*****************************************************************
* Looking for Arduino.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:Arduino.h"
* Web  > https://registry.platformio.org/search?q=header:Arduino.h
*
*****************************************************************

 #include <Arduino.h>
          ^~~~~~~~~~~
compilation terminated.
*** [.pioenvs\esp32\libe63\FastLED\power_mgt.cpp.o] Error 1
========================== [FAILED] Took 2.89 seconds ==========================




这个是ESP32-S3编译时的LOG:
INFO ESPHome 2024.3.1
INFO Reading configuration config/esp32s3.yaml...
INFO Generating C++ source...
INFO Compiling app...
********************************************************************************
Obsolete PIO Core v6.1.13 is used (previous was 6.1.14)
Please remove multiple PIO Cores from a system:
https://docs.platformio.org/en/latest/core/installation/troubleshooting.html
********************************************************************************
Processing esp32s3 (board: esp32-s3-devkitc-1; framework: arduino; platform: platformio/[email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP32S3 240MHz, 320KB RAM, 8MB Flash
 - toolchain-riscv32-esp @ 8.4.0+2021r2-patch5 
 - toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch5
Dependency Graph
|-- AsyncTCP-esphome @ 2.1.3
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.1.0
|-- DNSServer @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- noise-c @ 0.1.4
|-- ArduinoJson @ 6.18.5
Compiling .pioenvs\esp32s3\src\esphome\components\api\api_connection.cpp.o
Compiling .pioenvs\esp32s3\src\esphome\components\api\api_frame_helper.cpp.o
Compiling .pioenvs\esp32s3\src\esphome\components\api\api_pb2.cpp.o
Compiling .pioenvs\esp32s3\src\esphome\components\api\api_pb2_service.cpp.o
Compiling .pioenvs\esp32s3\src\esphome\components\api\api_server.cpp.o
Compiling .pioenvs\esp32s3\src\esphome\components\api\list_entities.cpp.o
Compiling .pioenvs\esp32s3\src\esphome\components\api\proto.cpp.o
Compiling .pioenvs\esp32s3\src\esphome\components\api\subscribe_state.cpp.o
In file included from src/esphome/components/socket/socket.h:6,
                 from src/esphome/components/api/api_frame_helper.h:14,
                 from src/esphome/components/api/api_connection.h:3,
                 from src/esphome/components/api/api_connection.cpp:1:
src/esphome/components/socket/headers.h:156:10: fatal error: sys/ioctl.h: No such file or directory
 #include <sys/ioctl.h>
          ^~~~~~~~~~~~~
compilation terminated.
*** [.pioenvs\esp32s3\src\esphome\components\api\api_connection.cpp.o] Error 1
In file included from src/esphome/components/socket/socket.h:6,
                 from src/esphome/components/api/api_frame_helper.h:14,
                 from src/esphome/components/api/api_frame_helper.cpp:1:
src/esphome/components/socket/headers.h:156:10: fatal error: sys/ioctl.h: No such file or directory
 #include <sys/ioctl.h>
          ^~~~~~~~~~~~~
compilation terminated.
*** [.pioenvs\esp32s3\src\esphome\components\api\api_frame_helper.cpp.o] Error 1
In file included from src/esphome/components/api/proto.h:4,
                 from src/esphome/components/api/api_pb2.h:5,
                 from src/esphome/components/api/api_pb2.cpp:3:
src/esphome/core/log.h:14:10: fatal error: esp_err.h: No such file or directory

*****************************************************************
* Looking for esp_err.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:esp_err.h"
* Web  > https://registry.platformio.org/search?q=header:esp_err.h
*
*****************************************************************

 #include <esp_err.h>
          ^~~~~~~~~~~
compilation terminated.
*** [.pioenvs\esp32s3\src\esphome\components\api\api_pb2.cpp.o] Error 1
In file included from src/esphome/components/api/proto.h:4,
                 from src/esphome/components/api/api_pb2.h:5,
                 from src/esphome/components/api/api_pb2_service.h:5,
                 from src/esphome/components/api/api_pb2_service.cpp:3:
src/esphome/core/log.h:14:10: fatal error: esp_err.h: No such file or directory

*****************************************************************
* Looking for esp_err.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:esp_err.h"
* Web  > https://registry.platformio.org/search?q=header:esp_err.h
*
*****************************************************************

 #include <esp_err.h>
          ^~~~~~~~~~~
compilation terminated.
*** [.pioenvs\esp32s3\src\esphome\components\api\api_pb2_service.cpp.o] Error 1
In file included from src/esphome/components/api/proto.h:4,
                 from src/esphome/components/api/api_pb2.h:5,
                 from src/esphome/components/api/api_server.h:4,
                 from src/esphome/components/api/api_server.cpp:1:
src/esphome/core/log.h:14:10: fatal error: esp_err.h: No such file or directory

*****************************************************************
* Looking for esp_err.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:esp_err.h"
* Web  > https://registry.platformio.org/search?q=header:esp_err.h
*
*****************************************************************

 #include <esp_err.h>
          ^~~~~~~~~~~
compilation terminated.
*** [.pioenvs\esp32s3\src\esphome\components\api\api_server.cpp.o] Error 1
In file included from src/esphome/components/api/proto.h:4,
                 from src/esphome/components/api/proto.cpp:1:
src/esphome/core/log.h:14:10: fatal error: esp_err.h: No such file or directory

*****************************************************************
* Looking for esp_err.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:esp_err.h"
* Web  > https://registry.platformio.org/search?q=header:esp_err.h
*
*****************************************************************

 #include <esp_err.h>
          ^~~~~~~~~~~
compilation terminated.
In file included from src/esphome/components/json/json_util.h:5,
                 from src/esphome/core/string_ref.h:10,
                 from src/esphome/core/entity_base.h:5,
                 from src/esphome/components/number/number.h:4,
                 from src/esphome/core/controller.h:32,
                 from src/esphome/core/component_iterator.h:4,
                 from src/esphome/components/api/list_entities.h:4,
                 from src/esphome/components/api/list_entities.cpp:1:
src/esphome/core/helpers.h:14:10: fatal error: esp_heap_caps.h: No such file or directory

***********************************************************************
* Looking for esp_heap_caps.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:esp_heap_caps.h"
* Web  > https://registry.platformio.org/search?q=header:esp_heap_caps.h
*
***********************************************************************

 #include <esp_heap_caps.h>
          ^~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pioenvs\esp32s3\src\esphome\components\api\proto.cpp.o] Error 1
*** [.pioenvs\esp32s3\src\esphome\components\api\list_entities.cpp.o] Error 1
In file included from src/esphome/components/json/json_util.h:5,
                 from src/esphome/core/string_ref.h:10,
                 from src/esphome/core/entity_base.h:5,
                 from src/esphome/components/number/number.h:4,
                 from src/esphome/core/controller.h:32,
                 from src/esphome/core/component_iterator.h:4,
                 from src/esphome/components/api/subscribe_state.h:4,
                 from src/esphome/components/api/subscribe_state.cpp:1:
src/esphome/core/helpers.h:14:10: fatal error: esp_heap_caps.h: No such file or directory

***********************************************************************
* Looking for esp_heap_caps.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:esp_heap_caps.h"
* Web  > https://registry.platformio.org/search?q=header:esp_heap_caps.h
*
***********************************************************************

 #include <esp_heap_caps.h>
          ^~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pioenvs\esp32s3\src\esphome\components\api\subscribe_state.cpp.o] Error 1
========================== [FAILED] Took 3.69 seconds ==========================


回复

使用道具 举报

0

主题

8

帖子

72

积分

注册会员

Rank: 2

积分
72
金钱
64
HASS币
0
发表于 2024-4-7 00:15:19 | 显示全部楼层
用anaconda单独装一个python3.8的版本试试?
回复

使用道具 举报

3

主题

33

帖子

177

积分

注册会员

Rank: 2

积分
177
金钱
144
HASS币
0
 楼主| 发表于 2024-4-7 06:13:10 | 显示全部楼层
chf1119 发表于 2024-4-7 00:15
用anaconda单独装一个python3.8的版本试试?

谢谢,我这就去试试
回复

使用道具 举报

3

主题

33

帖子

177

积分

注册会员

Rank: 2

积分
177
金钱
144
HASS币
0
 楼主| 发表于 2024-4-7 19:14:51 | 显示全部楼层
本帖最后由 graydot 于 2024-4-7 19:16 编辑
chf1119 发表于 2024-4-7 00:15
用anaconda单独装一个python3.8的版本试试?

在anaconda下新建环境,安装python3.8,并安装esphome后,尝试编译,最后提示好像是找不到和我电脑系统匹配的安装包,,已经魔法了,前面的安装包下载很快很顺利,还得需要指点啊
编译的时候,最后一行报错
Error: Could not find the package with 'platformio/tool-scons @ ~4.40300.0' requirements for your system 'windows_amd64'
(esphome) E:\ESPhome\esp32>esphome run espss.yaml
INFO Reading configuration espss.yaml...
WARNING 'esp_test': Using the '_' (underscore) character in the hostname is discouraged as it can cause problems with some DHCP and local name services. For more information, see https://esphome.io/guides/faq.html#why-shouldn-t-i-use-underscores-in-my-device-name
INFO Generating C++ source...
INFO Compiling app...
************************************************************************************************************************Obsolete PIO Core v6.0.2 is used (previous was 6.1.14)
Please remove multiple PIO Cores from a system:
https://docs.platformio.org/en/latest/core/installation/troubleshooting.html
************************************************************************************************************************
Processing esp_test (board: esp32doit-devkit-v1; framework: arduino; platform: platformio/espressif32 @ 3.5.0)
------------------------------------------------------------------------------------------------------------------------
Tool Manager: Installing platformio/toolchain-xtensa32 @ ~2.50200.0
INFO Installing platformio/toolchain-xtensa32 @ ~2.50200.0
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Tool Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Tool Manager: Installing platformio/framework-arduinoespressif32 @ ~3.10006.0
INFO Installing platformio/framework-arduinoespressif32 @ ~3.10006.0
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Tool Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Tool Manager: Installing platformio/tool-esptoolpy @ ~1.30100.0
INFO Installing platformio/tool-esptoolpy @ ~1.30100.0
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Tool Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Installing esphome/AsyncTCP-esphome @ 1.2.2
INFO Installing esphome/AsyncTCP-esphome @ 1.2.2
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Installing esphome/ESPAsyncWebServer-esphome @ 2.1.0
INFO Installing esphome/ESPAsyncWebServer-esphome @ 2.1.0
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Resolving dependencies...
INFO Resolving dependencies...
Library Manager: Installing ottowinter/ESPAsyncTCP-esphome
INFO Installing ottowinter/ESPAsyncTCP-esphome
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Installing Hash
INFO Installing Hash
Library Manager: Installing ESP8266WiFi
INFO Installing ESP8266WiFi
Library Manager: Installing esphome/noise-c @ 0.1.4
INFO Installing esphome/noise-c @ 0.1.4
Unpacking  [####################################]  100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Resolving dependencies...
INFO Resolving dependencies...
Library Manager: Installing esphome/libsodium @ 1.10018.1
INFO Installing esphome/libsodium @ 1.10018.1
Unpacking  [####################################]  100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Installing bblanchon/ArduinoJson @ 6.18.5
INFO Installing bblanchon/ArduinoJson @ 6.18.5
Unpacking  [####################################]  100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Tool Manager: Installing platformio/tool-scons @ ~4.40300.0
INFO Installing platformio/tool-scons @ ~4.40300.0
Error: Could not find the package with 'platformio/tool-scons @ ~4.40300.0' requirements for your system 'windows_amd64'

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-25 10:32 , Processed in 0.093336 second(s), 26 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表