esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
294 stars 37 forks source link

esp-idf does not build on windows #3961

Open evlo opened 1 year ago

evlo commented 1 year ago

The problem

I have tried on multiple win10 and win11 computers, python 3.11.1, wheels installed, result is always what is in screenshot bellow I think it is not permissions, but filename issue

Which version of ESPHome has the issue?

2022.12.3

What type of installation are you using?

pip

Which version of Home Assistant has the issue?

No response

What platform are you using?

ESP32-IDF

Board

t01-c3,esp32-cam

Component causing the issue

pyYaml?

Example YAML snippet

esphome:
  name: ehidfdemo
esp32:
  board: esp32cam
  framework: 
    type: esp-idf

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

Anything in the logs that might be useful for us?

image

Additional information

maybe not exactly issue with esphome, but something in the build stuff it is using python, wheels, pip, some library, framework, etc.

djanknecht commented 1 year ago

I think i found a workaround. After calling "pip install -U --force-reinstall "cryptography>=2.1.4,<35.0.0" "future>=0.15.2" "idf-component-manager~=1.0" manually once it works!

In my eyes, we have something like a circular reference here - during compile, pyyaml is needed, but the script tries to uninstall it.

eerorossi commented 1 year ago

I think i found a workaround. After calling "pip install -U --force-reinstall "cryptography>=2.1.4,<35.0.0" "future>=0.15.2" "idf-component-manager~=1.0" manually once it works!

In my eyes, we have something like a circular reference here - during compile, pyyaml is needed, but the script tries to uninstall it.

This works for me too.

marshn commented 1 year ago

I think i found a workaround. After calling "pip install -U --force-reinstall "cryptography>=2.1.4,<35.0.0" "future>=0.15.2" "idf-component-manager~=1.0" manually once it works!

In my eyes, we have something like a circular reference here - during compile, pyyaml is needed, but the script tries to uninstall it.

Using v2023.12.3, Windows 10, PIP and ESP32-EDF I had a very similar problem (I think something to do with the '~' characters in the path) during a reinstall of the charset_normalizer package which was happening with every build. In my case just running this was enough to stop the reinstall loop:

pip install -U --force-reinstall "idf-component-manager~=1.0"

Problem didn't happen with 2022.11.5, but did when I tried 2022.12.1 and 2022.12.2.

insurgent commented 1 year ago

pip install -U --force-reinstall "idf-component-manager~=1.0"

This worked for me - thanks!

Sorjak commented 1 year ago

Took me too long to find this thread while attempting to build firmware for my ESP32-S3-BOX, but @djanknecht's answer fixed it for me. Here's my config:

esp32:
  board: esp32s3box
  framework:
    type: esp-idf

I'm going to copy down the error text here in case it makes this easier to find:

ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\\Users\\<HOME>\\projects\\esphome\\voice_assistant\\.venv\\Lib\\site-packages\\~aml\\_yaml.cp311-win_amd64.pyd'