Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install ESP-IDF 5.3.2 via ESP-IDF Manager in Elclipse (IEP-1395) #1105

Open
sim0njo opened this issue Dec 28, 2024 · 2 comments
Open

Comments

@sim0njo
Copy link

sim0njo commented Dec 28, 2024

Describe the bug
Unable to install ESP-IDF from ESP-IDF Manager, tried downloading it, tried using a downloaded version, tried it 10 times
This really annoyes me
Your documentation about installing the ESP-IDF in Eclipse is also like going in circles, missing concise and working procedure !!!

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'ESP-IDF manager' in Eclipse
  2. Click on 'Add ESP-IDF' -> download ESP-IDF to C:\Espressif -> press Finish
  3. Scroll down to '....'
  4. See error

Selected targets are: esp32c6, esp32h2, esp32s3, esp32c61, esp32c2, esp32c3, esp32c5, esp32, esp32p4, esp32s2
Current system platform: win64
Installing tools: xtensa-esp-elf-gdb, riscv32-esp-elf-gdb, xtensa-esp-elf, esp-clang, riscv32-esp-elf, esp32ulp-elf, cmake, openocd-esp32, ninja, idf-exe, ccache, dfu-util, esp-rom-elfs, qemu-xtensa, qemu-riscv32
Skipping [email protected]_20240403 (already installed)
Skipping [email protected]_20240403 (already installed)
Skipping [email protected]_20240530 (already installed)
Skipping [email protected] (already installed)
Skipping [email protected]_20240530 (already installed)
Skipping [email protected]_20240113 (already installed)
Skipping [email protected] (already installed)
Skipping [email protected] (already installed)
Skipping [email protected] (already installed)
Skipping [email protected] (already installed)
Skipping [email protected] (already installed)
Skipping [email protected] (already installed)
Skipping esp-rom-elfs@20240305 (already installed)
Skipping qemu-xtensa@esp_develop_9.0.0_20240606 (already installed)
Skipping qemu-riscv32@esp_develop_9.0.0_20240606 (already installed)

Executing C:\Users\simonjo\AppData\Local\Microsoft\WindowsApps\python3.EXE C:\Espressif\esp-idf-v5.3.2\tools\idf_tools.py install-python-env
Python 3.11.2
pip 24.3.1 from C:\Users\simonjo\Espressif\python_env\idf5.3_py3.11_env\Lib\site-packages\pip (python 3.11)

Skipping the download of C:\Users\simonjo.espressif\espidf.constraints.v5.3.txt because it was downloaded recently.
Upgrading pip and setuptools...
Looking in indexes: https://pypi.org/simple, https://dl.espressif.com/pypi
Requirement already satisfied: pip in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (24.3.1)
Requirement already satisfied: setuptools in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (71.0.0)
Installing Python packages
Constraint file: C:\Users\simonjo.espressif\espidf.constraints.v5.3.txt
Requirement files:

  • C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt
    Looking in indexes: https://pypi.org/simple, https://dl.espressif.com/pypi, https://dl.espressif.com/pypi
    Ignoring importlib_metadata: markers 'python_version < "3.8"' don't match your environment
    Requirement already satisfied: setuptools in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from -r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 3)) (71.0.0)
    Requirement already satisfied: packaging in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from -r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 4)) (24.2)
    Requirement already satisfied: click in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from -r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 7)) (8.1.8)
    Requirement already satisfied: pyserial in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from -r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 8)) (3.5)
    Requirement already satisfied: cryptography in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from -r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 9)) (42.0.8)
    Requirement already satisfied: pyparsing in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from -r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 10)) (3.2.0)
    Requirement already satisfied: pyelftools in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from -r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 11)) (0.31)
    Requirement already satisfied: idf-component-manager in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from -r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 12)) (2.1.1)
    Requirement already satisfied: esp-coredump in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from -r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 13)) (1.12.0)
    Requirement already satisfied: esptool in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from -r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 14)) (4.8.1)
    Requirement already satisfied: esp-idf-kconfig in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from -r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 15)) (2.4.1)
    Requirement already satisfied: esp-idf-monitor in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from -r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 16)) (1.5.0)
    Requirement already satisfied: esp-idf-nvs-partition-gen in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from -r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 17)) (0.1.6)
    Requirement already satisfied: esp-idf-size in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from -r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 18)) (1.6.1)
    Requirement already satisfied: esp-idf-panic-decoder in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from -r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 19)) (1.2.1)
    Requirement already satisfied: pyclang in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from -r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 20)) (0.6.0)
    Requirement already satisfied: construct in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from -r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 21)) (2.10.70)
    Requirement already satisfied: freertos_gdb in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from -r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 24)) (1.0.3)
    Requirement already satisfied: colorama in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from click->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 7)) (0.4.6)
    Requirement already satisfied: cffi>=1.12 in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from cryptography->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 9)) (1.17.1)
    Requirement already satisfied: pyyaml in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from idf-component-manager->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 12)) (6.0.2)
    Requirement already satisfied: ruamel.yaml in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from idf-component-manager->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 12)) (0.18.6)
    Requirement already satisfied: requests in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from idf-component-manager->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 12)) (2.32.3)
    Requirement already satisfied: requests-file in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from idf-component-manager->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 12)) (2.1.0)
    Requirement already satisfied: requests-toolbelt in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from idf-component-manager->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 12)) (1.0.0)
    Requirement already satisfied: tqdm in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from idf-component-manager->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 12)) (4.67.1)
    Requirement already satisfied: jsonref in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from idf-component-manager->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 12)) (1.1.0)
    Requirement already satisfied: pydantic in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from idf-component-manager->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 12)) (2.10.3)
    Requirement already satisfied: pydantic-core in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from idf-component-manager->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 12)) (2.27.1)
    Requirement already satisfied: pydantic-settings in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from idf-component-manager->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 12)) (2.7.0)
    Requirement already satisfied: typing-extensions in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from idf-component-manager->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 12)) (4.12.2)
    Requirement already satisfied: pygdbmi>=0.9.0.2 in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from esp-coredump->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 13)) (0.11.0.0)
    Requirement already satisfied: bitstring!=4.2.0,>=3.1.6 in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from esptool->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 14)) (4.2.3)
    Requirement already satisfied: ecdsa>=0.16.0 in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from esptool->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 14)) (0.19.0)
    Requirement already satisfied: reedsolo<1.8,>=1.5.3 in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from esptool->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 14)) (1.7.0)
    Requirement already satisfied: intelhex in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from esptool->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 14)) (2.3.0)
    Requirement already satisfied: windows-curses in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from esp-idf-kconfig->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 15)) (2.4.0)
    Requirement already satisfied: rich in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from esp-idf-size->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 18)) (13.9.4)
    Requirement already satisfied: bitarray<3.0.0,>=2.9.0 in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from bitstring!=4.2.0,>=3.1.6->esptool->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 14)) (2.9.3)
    Requirement already satisfied: pycparser in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from cffi>=1.12->cryptography->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 9)) (2.22)
    Requirement already satisfied: six>=1.9.0 in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from ecdsa>=0.16.0->esptool->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 14)) (1.17.0)
    Requirement already satisfied: annotated-types>=0.6.0 in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from pydantic->idf-component-manager->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 12)) (0.7.0)
    Requirement already satisfied: python-dotenv>=0.21.0 in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from pydantic-settings->idf-component-manager->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 12)) (1.0.1)
    Requirement already satisfied: charset-normalizer<4,>=2 in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from requests->idf-component-manager->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 12)) (3.4.0)
    Requirement already satisfied: idna<4,>=2.5 in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from requests->idf-component-manager->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 12)) (3.10)
    Requirement already satisfied: urllib3<3,>=1.21.1 in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from requests->idf-component-manager->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 12)) (1.26.20)
    Requirement already satisfied: certifi>=2017.4.17 in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from requests->idf-component-manager->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 12)) (2024.12.14)
    Requirement already satisfied: markdown-it-py>=2.2.0 in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from rich->esp-idf-size->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 18)) (3.0.0)
    Requirement already satisfied: pygments<3.0.0,>=2.13.0 in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from rich->esp-idf-size->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 18)) (2.18.0)
    Requirement already satisfied: ruamel.yaml.clib>=0.2.7 in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from ruamel.yaml->idf-component-manager->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 12)) (0.2.12)
    Requirement already satisfied: mdurl~=0.1 in c:\users\simonjo\espressif\python_env\idf5.3_py3.11_env\lib\site-packages (from markdown-it-py>=2.2.0->rich->esp-idf-size->-r C:\Espressif\frameworks\esp-idf-v5.3.2\tools\requirements\requirements.core.txt (line 18)) (0.1.2)

Executing C:\Users\simonjo\AppData\Local\Microsoft\WindowsApps\python3.EXE C:\Espressif\esp-idf-v5.3.2\tools\idf_tools.py export --format=key-value
Executing null/Scripts/python.exe C:\Espressif\esp-idf-v5.3.2\tools\idf.py --version
Executing null/Scripts/python.exe C:\Espressif\esp-idf-v5.3.2\tools\idf.py --list-targets

Cannot run program "null/Scripts/python.exe" (in directory ""): CreateProcess error=2, The system cannot find the file specified
Cannot run program "null/Scripts/python.exe" (in directory ""): CreateProcess error=2, The system cannot find the file specified
<<<

Expected behavior
ESP-IDF to be installed. Come on guys this problem is ongoing for quiet some time now

Screenshots
If applicable, add screenshots to help explain your problem.

Espressif-IDE Product Information:
Espressif > Product Information (Copy content from the console and attach as a file)

Eclipse Error log:
Window > Show View > Other > Search for "Error Log" (Attach as a file)

Please attach the error log as described here https://github.com/espressif/idf-eclipse-plugin#error-log

@github-actions github-actions bot changed the title Unable to install ESP-IDF 5.3.2 via ESP-IDF Manager in Elclipse Unable to install ESP-IDF 5.3.2 via ESP-IDF Manager in Elclipse (IEP-1395) Dec 28, 2024
@sim0njo
Copy link
Author

sim0njo commented Dec 31, 2024

I try to find some logic in the failures, so tried maybe 10 times and found following:

  1. First installed Eclipse CDT and ESP-IDF Plugin

  2. in ESP-IDF Manager -> Add ESP-IDF

  • GIT = C:\Program Files\Git\cmd\git.EXE
  • Python = C:\Users\simonjo\AppData\Local\Microsoft\WindowsApps\python3.EXE
  • Download v5.3.2 to c:\Espressif
  1. This ends with following error and indicates a script error as there is no frameworks sub-directory !!!

ERROR: It is not possible to determine the IDF version: [Errno 2] No such file or directory: 'C:\Espressif\frameworks\esp-idf-v5.3.2\components\esp_common\include\esp_idf_version.h'
<<<

  1. I create c:\Espressif\frameworks and copy the esp-idf-v5.3.2 directory to it (copy, not move)

  2. Redo Add ESP-IDF from ESP-IDF Manager

  • Use existing ESP-IDF directory -> c:\Espressif\esp-idf-v5.3.2
  • Now the different tools are installed
  • But it still ends with an error like this

Executing C:\Users\simonjo\AppData\Local\Microsoft\WindowsApps\python3.EXE C:\Espressif\esp-idf-v5.3.2\tools\idf_tools.py export --format=key-value
Executing null/Scripts/python.exe C:\Espressif\esp-idf-v5.3.2\tools\idf.py --version
Executing null/Scripts/python.exe C:\Espressif\esp-idf-v5.3.2\tools\idf.py --list-targets

Cannot run program "null/Scripts/python.exe" (in directory ""): CreateProcess error=2, The system cannot find the file specified
<<<

Again a scripting problem, on the first line you see python3 being called from the corect path. But in line 2 and 3 there is a problem. This should refer to c:\Users\simonjo\Espressif\python_env\idf5.3_py3.11_env\Scripts\python.exe

I tried to create c:\null and copy the Scripts directory there... but Add ESP-IDF keeps failing !

@sim0njo
Copy link
Author

sim0njo commented Dec 31, 2024

Looking at idf_tools.py I find following code

def get_python_exe_and_subdir() -> Tuple[str, str]:
"""
Returns:
* python executable name (python on Unix, python.exe on Win)
* subdir in which the executable is (bin for Unix, Scripts for Win)
"""
if sys.platform == 'win32':
subdir = 'Scripts'
python_exe = 'python.exe'
else:
subdir = 'bin'
python_exe = 'python'
return python_exe, subdir

def get_python_env_path() -> Tuple[str, str, str, str]:
"""
Returns tuple of Python environment path, Python env. path with subdir and full path from Python (i.e. with executable).
"""
idf_version = get_idf_version()
idf_python_env_path = os.getenv('IDF_PYTHON_ENV_PATH') or os.path.join(g.idf_tools_path,
'python_env',
PYTHON_VENV_DIR_TEMPLATE.format(idf_version,
PYTHON_VER_MAJOR_MINOR))

python_exe, subdir = get_python_exe_and_subdir()
idf_python_export_path = os.path.join(idf_python_env_path, subdir)
virtualenv_python = os.path.join(idf_python_export_path, python_exe)

return idf_python_env_path, idf_python_export_path, virtualenv_python, idf_version

So it all comes down to IDF_PYTHON_ENV_PATH... which is set to following: IDF_PYTHON_ENV_PATH=C:\Users\simonjo\Espressif\python_env\idf5.3_py3.11_env

From my calculation this should end up in
virtualenv_python=c:\Users\simonjo\Espressif\python_env\idf5.3_py3.11_env\Scripts\python.exe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant