esp-idf icon indicating copy to clipboard operation
esp-idf copied to clipboard

Provide guidance on updating Python dependencies (IDFGH-15431)

Open nebkat opened this issue 7 months ago • 1 comments

Many parts of the esp-idf project are located in Python packages that are installed at initial virtualenv setup using idf_tools.py:

  • idf-component-manager
  • esptool
  • esp-idf-kconfig
  • esp-idf-monitor
  • esp-idf-nvs-partition-gen
  • esp-idf-size
  • esp-idf-diag
  • esp-idf-panic-decoder

These packages receive occasional quality-of-life improvements, but there is no standard mechanism by which they can be updated in an existing installation (without explicitly knowing about and performing the upgrade).

This is a real shame as developers are missing out on these improvements.

I would like to suggest the addition of an idf_tools.py update-python-dependencies or at least some documentation on the correct way to perform these upgrades without breaking anything.

nebkat avatar Jun 06 '25 13:06 nebkat

Hello @nebkat,

You can update the packages in the ESP-IDF virtual environment by running idf_tools.py install-python-env or by executing ./install.sh, which calls the same command. The install-python-env command uses pip install with the --upgrade option by default. This should update the packages to their latest versions unless they are restricted by the constraint file for the specific ESP-IDF version.

I don't see this mentioned in the documentation, so it likely needs to be added.

Thank you!

fhrbata avatar Jun 06 '25 14:06 fhrbata