Page 1 of 1

Unable to install esp-idf in VSCode

Posted: Mon Apr 07, 2025 3:23 pm
by miskor
Hello ESP32 forum,

Newbie here, having issues with esp-idf extension for (newly installed) VSCode...

I've tried different version of esp-idf and different download site but error is still the same:

Downloading https://dl.espressif.com/dl/esp-idf/esp ... s.v5.4.txt
Destination: C:\Users\misko\.espressif\espidf.constraints.v5.4.txt.tmp

WARNING: Download failure: [ASN1] nested asn1 error (_ssl.c:4004)
WARNING: Failed to download https://dl.espressif.com/dl/esp-idf/esp ... s.v5.4.txt to
C:\Users\misko\.espressif\espidf.constraints.v5.4.txt.tmp

Downloading https://dl.espressif.com/dl/esp-idf/esp ... s.v5.4.txt
Destination: C:\Users\misko\.espressif\espidf.constraints.v5.4.txt.tmp

WARNING: Download failure: [ASN1] nested asn1 error (_ssl.c:4004)
WARNING: Failed to download https://dl.espressif.com/dl/esp-idf/esp ... s.v5.4.txt to
C:\Users\misko\.espressif\espidf.constraints.v5.4.txt.tmp

Downloading https://dl.espressif.com/dl/esp-idf/esp ... s.v5.4.txt
Destination: C:\Users\misko\.espressif\espidf.constraints.v5.4.txt.tmp

WARNING: Download failure: [ASN1] nested asn1 error (_ssl.c:4004)
WARNING: Failed to download https://dl.espressif.com/dl/esp-idf/esp ... s.v5.4.txt to
C:\Users\misko\.espressif\espidf.constraints.v5.4.txt.tmp
ERROR: Failed to download, and retry count has expired

Please make sure you have a working Internet connection.
By downloading and using the offline installer from https://dl.espressif.com/dl/esp-idf you might be able to work around this issue.
See the help on how to disable constraints in order to work around this issue.

non zero exit code 1

Python 3.11.2
pip 22.3.1 from C:\Users\misko\.espressif\python_env\idf5.4_py3.11_env\Lib\site-packages\pip (python 3.11)

Downloading https://dl.espressif.com/dl/esp-idf/esp ... s.v5.4.txt
Destination: C:\Users\misko\.espressif\espidf.constraints.v5.4.txt.tmp
WARNING: Download failure: [ASN1] nested asn1 error (_ssl.c:4004)
WARNING: Failed to download https://dl.espressif.com/dl/esp-idf/esp ... s.v5.4.txt to C:\Users\misko\.espressif\espidf.constraints.v5.4.txt.tmp
Downloading https://dl.espressif.com/dl/esp-idf/esp ... s.v5.4.txt
Destination: C:\Users\misko\.espressif\espidf.constraints.v5.4.txt.tmp
WARNING: Download failure: [ASN1] nested asn1 error (_ssl.c:4004)
WARNING: Failed to download https://dl.espressif.com/dl/esp-idf/esp ... s.v5.4.txt to C:\Users\misko\.espressif\espidf.constraints.v5.4.txt.tmp
Downloading https://dl.espressif.com/dl/esp-idf/esp ... s.v5.4.txt
Destination: C:\Users\misko\.espressif\espidf.constraints.v5.4.txt.tmp
WARNING: Download failure: [ASN1] nested asn1 error (_ssl.c:4004)
WARNING: Failed to download https://dl.espressif.com/dl/esp-idf/esp ... s.v5.4.txt to C:\Users\misko\.espressif\espidf.constraints.v5.4.txt.tmp
ERROR: Failed to download, and retry count has expired
Please make sure you have a working Internet connection.
By downloading and using the offline installer from https://dl.espressif.com/dl/esp-idf you might be able to work around this issue.
See the help on how to disable constraints in order to work around this issue.

I've attached (zipped) esp doctor log.

Does anyone know how to fix this? Thanks!

Re: Unable to install esp-idf in VSCode

Posted: Tue Apr 08, 2025 7:14 am
by FBEZ
Hi Miskor,

welcome to the forum!
Not sure if I understand correctly. You have problems installing the extension or using it?

To install the extension, you have to use the procedure for downloading vscode plug-ins. You click on the four squares on the left (Extensions) and search for ESP-IDF in the extension search bar. From there, you just click install.

Re: Unable to install esp-idf in VSCode

Posted: Tue Apr 08, 2025 12:24 pm
by miskor
Hi @ESP_FBEZ,

I was following the steps for the clean esp-idf VSCode installation given here:

https://docs.espressif.com/projects/vsc ... ation.html

But, installation in step 5 was unable to finish successfully, error was raised that I sent earlier:

Downloading https://dl.espressif.com/dl/esp-idf/esp ... s.v5.4.txt
Destination: C:\Users\misko\.espressif\espidf.constraints.v5.4.txt.tmp

WARNING: Download failure: [ASN1] nested asn1 error (_ssl.c:4004)
WARNING: Failed to download https://dl.espressif.com/dl/esp-idf/esp ... s.v5.4.txt to C:\Users\misko\.espressif\espidf.constraints.v5.4.txt.tmp

In my opinion that error points out that specific file ("https://dl.espressif.com/dl/esp-idf/esp ... s.v5.4.txt") is unavailable for download from espressif web site but strange enough if I do a wget of that url - file is downloaded!

Thanks again for your support!

Re: Unable to install esp-idf in VSCode

Posted: Tue Apr 08, 2025 7:49 pm
by miskor
Additionally, I've deleted all traces of esp-idf and then tried with offline installer (as suggested in the end of the error output from VScode but then different error appeared:

...
Installing D:\Espressif\tools\idf-git\2.39.2 ...
Extracted D:\Espressif\tools\idf-git\2.39.2 ...
Using existing D:\Espressif\tools\idf-python\3.11.2
"D:\Espressif\tools\idf-python\3.11.2\python.exe -m pip" is not valid. (ERROR_INVALID_PIP)


And that pip was installed by offline installer, I do not have any other pip or python on my computer...

Is this software some kind of a joke?

Re: Unable to install esp-idf in VSCode

Posted: Sat Apr 12, 2025 4:36 pm
by SergeyO
Try this:

Code: Select all

D:\Espressif\tools\idf-python\3.11.2\python.exe -m pip install --upgrade pip
It will update pip to latest version.

Re: Unable to install esp-idf in VSCode

Posted: Sun Apr 13, 2025 10:09 am
by miskor
Thanks @SergeyO ,

Got new error:

PS D:\> D:\Espressif\tools\idf-python\3.11.2\python.exe -m pip install --upgrade pip
D:\Espressif\tools\idf-python\3.11.2\python.exe: No module named pip

Re: Unable to install esp-idf in VSCode

Posted: Sun Apr 13, 2025 10:15 am
by miskor
when stared from esp-idf cmd prompt I got following errors:

Setting PYTHONNOUSERSITE, was not set
Using Python in D:\Espressif\python_env\idf5.4_py3.11_env\Scripts\
Unable to create process using '"D:\Espressif\tools\idf-python\3.11.2\python.exe" --version'
Using Git in D:\Espressif\tools\idf-git\2.44.0\cmd\
git version 2.44.0.windows.1

Error: The following tools are not installed in your environment.

python


Please use the Windows Tool installer for setting up your environment.
Download link: https://dl.espressif.com/dl/esp-idf/
For more details please visit our website: https://docs.espressif.com/projects/esp ... setup.html

D:\Espressif\frameworks\esp-idf-v5.4.1>D:\Espressif\tools\idf-python\3.11.2\python.exe -m pip install --upgrade pip
Access is denied.

D:\Espressif\frameworks\esp-idf-v5.4.1>

Re: Unable to install esp-idf in VSCode

Posted: Sun Apr 13, 2025 10:25 am
by miskor
and that is brand new installation...

Re: Unable to install esp-idf in VSCode

Posted: Thu Apr 17, 2025 2:58 am
by bignacio
Seems that your initial error was due to networking issue. If you are using a proxy (either in vscode or in your setup) it might break the connection to Espressif download servers as described by the error.

Currently you use the offline installer which it seems not to include pip in the embedded python path.

Try running D:\Espressif\tools\idf-python\3.11.2\python.exe -m ensurepip to install pip in the embedded python. Check that D:\Espressif\tools\idf-python\3.11.2\python.exe -m pip --version does return the version. Test again in extension setup wizard.