[已解决]求助,Esphome win10和Ubuntu例程都无法编译通过(装docker解决)

新手,在Ubuntu 18.04 pip3 install esphome 成功,esphome esphome_config/ dashboard后能打开网页,但是写一个最简单例程,只有wifi名称密码的,板子选的nodemcu,编译出红字,不成功。
试几次都这样无奈转windows,win10直接安装的python3.8,然后 pip3 install esphome安装的esphome,没用docker,esphome esphome_config/ dashboard出红字失败,用的命令行esphome livingroom.yaml wizard,4步建立的yaml ,然后esphome livingroom.yaml compile 编译失败,请前辈帮忙,谢谢。
livingroom.yaml (391 字节)


不懂帮顶。
PS:虽然论坛不欢迎灌水,但是还要灌一下,希望硬件大佬看到可以帮楼主。

会不会是python3.8的原因呢?我ubuntu和win10都是3.8,错误提示都是一样的,以下是ubuntu的错误提示

Dependency Graph
|-- 1.2.2
| |-- 1.0
|-- 1.0
|-- 1.2
| |-- 1.0
|-- 1.2.6
| |-- 1.2.2
| | |-- 1.0
| |-- 1.0
| |-- 1.0
|-- 1.1.1
| |-- 1.0
Compiling .pioenvs/ty66/src/esphome/components/api/api_connection.cpp.o
Compiling .pioenvs/ty66/src/esphome/components/api/api_pb2.cpp.o
Compiling .pioenvs/ty66/src/esphome/components/api/api_pb2_service.cpp.o
Compiling .pioenvs/ty66/src/esphome/components/api/api_server.cpp.o
In file included from src/esphome/core/component.h:5,
from src/esphome/components/api/proto.h:3,
from src/esphome/components/api/api_pb2.h:3,
from src/esphome/components/api/api_pb2.cpp:1:
/home/cai/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/Arduino.h:270:12: error: ‘isinf’ has not been declared in ‘std’
270 | using std::isinf;
| ^~~~~
In file included from src/esphome/core/component.h:5,
from src/esphome/components/api/proto.h:3,
from src/esphome/components/api/api_pb2.h:3,
from src/esphome/components/api/api_pb2_service.h:3,
from src/esphome/components/api/api_pb2_service.cpp:1:
/home/cai/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/Arduino.h:270:12: error: ‘isinf’ has not been declared in ‘std’
270 | using std::isinf;
| ^~~~~
/home/cai/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/Arduino.h:271:12: error: ‘isnan’ has not been declared in ‘std’
271 | using std::isnan;
| ^~~~~
/home/cai/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/Arduino.h:271:12: error: ‘isnan’ has not been declared in ‘std’
271 | using std::isnan;
| ^~~~~
In file included from src/esphome/core/component.h:5,
from src/esphome/components/api/api_connection.h:3,
from src/esphome/components/api/api_connection.cpp:1:
/home/cai/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/Arduino.h:270:12: error: ‘isinf’ has not been declared in ‘std’
270 | using std::isinf;
| ^~~~~
/home/cai/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/Arduino.h:271:12: error: ‘isnan’ has not been declared in ‘std’
271 | using std::isnan;
| ^~~~~
In file included from src/esphome/core/component.h:5,
from src/esphome/components/api/api_server.h:3,
from src/esphome/components/api/api_server.cpp:1:
/home/cai/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/Arduino.h:270:12: error: ‘isinf’ has not been declared in ‘std’
270 | using std::isinf;
| ^~~~~
/home/cai/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/Arduino.h:271:12: error: ‘isnan’ has not been declared in ‘std’
271 | using std::isnan;
| ^~~~~
In file included from src/esphome/components/api/api_server.h:12,
from src/esphome/components/api/api_server.cpp:1:
src/esphome/components/api/homeassistant_service.h: In member function ‘void esphome::api::HomeAssistantServiceCallAction::play(Ts …)’:
src/esphome/components/api/homeassistant_service.h:54:18: warning: invalid use of incomplete type ‘class esphome::api::APIServer’
54 | this->parent_->send_homeassistant_service_call(resp);
| ^~
In file included from src/esphome/components/api/api_server.h:9,
from src/esphome/components/api/api_server.cpp:1:
src/esphome/components/api/util.h:13:7: note: forward declaration of ‘class esphome::api::APIServer’
13 | class APIServer;
| ^~~~~~~~~
In file included from src/esphome/components/api/api_server.h:12,
from src/esphome/components/api/api_connection.h:7,
from src/esphome/components/api/api_connection.cpp:1:
src/esphome/components/api/homeassistant_service.h: In member function ‘void esphome::api::HomeAssistantServiceCallAction::play(Ts …)’:
src/esphome/components/api/homeassistant_service.h:54:18: warning: invalid use of incomplete type ‘class esphome::api::APIServer’
54 | this->parent_->send_homeassistant_service_call(resp);
| ^~
In file included from src/esphome/components/api/api_server.h:9,
from src/esphome/components/api/api_connection.h:7,
from src/esphome/components/api/api_connection.cpp:1:
src/esphome/components/api/util.h:13:7: note: forward declaration of ‘class esphome::api::APIServer’
13 | class APIServer;
| ^~~~~~~~~
*** [.pioenvs/ty66/src/esphome/components/api/api_pb2_service.cpp.o] Error 1
*** [.pioenvs/ty66/src/esphome/components/api/api_connection.cpp.o] Error 1
*** [.pioenvs/ty66/src/esphome/components/api/api_server.cpp.o] Error 1
*** [.pioenvs/ty66/src/esphome/components/api/api_pb2.cpp.o] Error 1

3.8确实容易出问题

退回python2.7不行,装3.7不行,最后ubuntu装docker解决了

这个软件对小白不太友好,要是能做来大多数人都很快上手,推广起来就更快了。