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

use older embed python for older that idf 5 #1021

Merged
merged 5 commits into from
Aug 24, 2023

Conversation

brianignacio5
Copy link
Collaborator

Description

Use Embed Python 3.8.7 for ESP-IDF < v5.0

Fixes #1015

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Steps to test this pull request

  1. Click on "Configure ESP-IDF extension" command
  2. Install ESP-IDF v4.4.5 or older
  3. Observe results. Check installed embed Python is 3.8.7 and virtual environment is created.
  4. Click on "Configure ESP-IDF extension" command
  5. Install ESP-IDF v5.0 or higher
  6. Observe results. Check installed embed Python is 3.11.2 and virtual environment is created.
  • Expected behaviour: Setup works correctly

  • Expected output: Python 3.8.7 for IDF < 5.0 and 3.11.2 for IDF >= 5.0

How has this been tested?

Manual testing

Test Configuration:

  • ESP-IDF Version: 5.0, 4.4.5
  • OS (Windows,Linux and macOS): Windows 10

Checklist

  • PR Self Reviewed
  • Applied Code formatting
  • Added Documentation
  • Added Unit Test
  • Verified on all platforms - Windows,Linux and macOS

@github-actions
Copy link

github-actions bot commented Aug 4, 2023

Download the artifacts for this pull request:

@AndriiFilippov
Copy link
Collaborator

@brianignacio5 hi !

Tested under:
OS: Windows 10
VS Code: 1.81.1
ESP-IDF: v4.4.5 / v5.1

Able to configure extension via"Configure ESP-IDF extension" command with ESP-IDF v4.4.5.
Installed embed Python is 3.8.7 and virtual environment is created. But there is some errors in console:

df-python-3.8.7-embed-win64.zip progress: 99.89% (19594.55 / 19615.46) KB
idf-python-3.8.7-embed-win64.zip progress: 99.97% (19610.55 / 19615.46) KB
idf-python-3.8.7-embed-win64.zip progress: 100.00% (19615.46 / 19615.46) KB
Extracted c:\Users\AndriiFilippov\.espressif\tools\idf-python\3.8.7 ...
Requirement already satisfied: virtualenv in c:\users\andriifilippov\appdata\roaming\python\python38\site-packages (20.16.3)

Requirement already satisfied: platformdirs<3,>=2.4 in c:\users\andriifilippov\appdata\roaming\python\python38\site-packages (from virtualenv) (2.5.2)

Requirement already satisfied: distlib<1,>=0.3.5 in c:\users\andriifilippov\appdata\roaming\python\python38\site-packages (from virtualenv) (0.3.5)

Requirement already satisfied: filelock<4,>=3.4.1 in c:\users\andriifilippov\appdata\roaming\python\python38\site-packages (from virtualenv) (3.8.0)

WARNING: You are using pip version 20.3.3; however, version 23.2.1 is available.
You should consider upgrading via the 'c:\Users\AndriiFilippov\.espressif\tools\idf-python\3.8.7\python.exe -m pip install --upgrade pip' command.

'xtensa-esp-elf-gdb-no-python' is not recognized as an internal or external command,
operable program or batch file.
Command failed: xtensa-esp-elf-gdb-no-python --version
'xtensa-esp-elf-gdb-no-python' is not recognized as an internal or external command,
operable program or batch file.
Error checking xtensa-esp-elf-gdb version
Error: Command failed: xtensa-esp-elf-gdb-no-python --version
'xtensa-esp-elf-gdb-no-python' is not recognized as an internal or external command,
operable program or batch file.

'xtensa-esp32-elf-gcc' is not recognized as an internal or external command,
operable program or batch file.
Command failed: xtensa-esp32-elf-gcc --version
'xtensa-esp32-elf-gcc' is not recognized as an internal or external command,
operable program or batch file.
Error checking xtensa-esp32-elf version
Error: Command failed: xtensa-esp32-elf-gcc --version
'xtensa-esp32-elf-gcc' is not recognized as an internal or external command,
operable program or batch file.

'riscv32-esp-elf-gdb-no-python' is not recognized as an internal or external command,
operable program or batch file.
Command failed: riscv32-esp-elf-gdb-no-python --version
'riscv32-esp-elf-gdb-no-python' is not recognized as an internal or external command,
operable program or batch file.
Error checking riscv32-esp-elf-gdb version
Error: Command failed: riscv32-esp-elf-gdb-no-python --version
'riscv32-esp-elf-gdb-no-python' is not recognized as an internal or external command,
operable program or batch file.

'riscv32-esp-elf-gcc' is not recognized as an internal or external command,
operable program or batch file.
Command failed: riscv32-esp-elf-gcc --version
'riscv32-esp-elf-gcc' is not recognized as an internal or external command,
operable program or batch file.
Error checking riscv32-esp-elf version
Error: Command failed: riscv32-esp-elf-gcc --version
'riscv32-esp-elf-gcc' is not recognized as an internal or external command,
operable program or batch file.

'xtensa-esp32s2-elf-gcc' is not recognized as an internal or external command,
operable program or batch file.
Command failed: xtensa-esp32s2-elf-gcc --version
'xtensa-esp32s2-elf-gcc' is not recognized as an internal or external command,
operable program or batch file.
Error checking xtensa-esp32s2-elf version
Error: Command failed: xtensa-esp32s2-elf-gcc --version
'xtensa-esp32s2-elf-gcc' is not recognized as an internal or external command,
operable program or batch file.

'xtensa-esp32s3-elf-gcc' is not recognized as an internal or external command,
operable program or batch file.
Command failed: xtensa-esp32s3-elf-gcc --version
'xtensa-esp32s3-elf-gcc' is not recognized as an internal or external command,
operable program or batch file.
Error checking xtensa-esp32s3-elf version
Error: Command failed: xtensa-esp32s3-elf-gcc --version
'xtensa-esp32s3-elf-gcc' is not recognized as an internal or external command,
operable program or batch file.

'cmake' is not recognized as an internal or external command,
operable program or batch file.
Command failed: cmake --version
'cmake' is not recognized as an internal or external command,
operable program or batch file.
Error checking cmake version
Error: Command failed: cmake --version
'cmake' is not recognized as an internal or external command,
operable program or batch file.

'openocd' is not recognized as an internal or external command,
operable program or batch file.
Command failed: openocd --version
'openocd' is not recognized as an internal or external command,
operable program or batch file.
Error checking openocd-esp32 version
Error: Command failed: openocd --version
'openocd' is not recognized as an internal or external command,
operable program or batch file.

'esp32ulp-elf-as' is not recognized as an internal or external command,
operable program or batch file.
Command failed: esp32ulp-elf-as --version
'esp32ulp-elf-as' is not recognized as an internal or external command,
operable program or batch file.
Error checking esp32ulp-elf version
Error: Command failed: esp32ulp-elf-as --version
'esp32ulp-elf-as' is not recognized as an internal or external command,
operable program or batch file.

'idf.py.exe' is not recognized as an internal or external command,
operable program or batch file.
Command failed: idf.py.exe -v
'idf.py.exe' is not recognized as an internal or external command,
operable program or batch file.
Error checking idf-exe version
Error: Command failed: idf.py.exe -v
'idf.py.exe' is not recognized as an internal or external command,
operable program or batch file.

'ninja' is not recognized as an internal or external command,
operable program or batch file.
Command failed: ninja --version
'ninja' is not recognized as an internal or external command,
operable program or batch file.
Error checking ninja version
Error: Command failed: ninja --version
'ninja' is not recognized as an internal or external command,
operable program or batch file.

'ccache.exe' is not recognized as an internal or external command,
operable program or batch file.
Command failed: ccache.exe --version
'ccache.exe' is not recognized as an internal or external command,
operable program or batch file.
Error checking ccache version
Error: Command failed: ccache.exe --version
'ccache.exe' is not recognized as an internal or external command,
operable program or batch file.

'dfu-util' is not recognized as an internal or external command,
operable program or batch file.
Command failed: dfu-util --version
'dfu-util' is not recognized as an internal or external command,
operable program or batch file.
Error checking dfu-util version
Error: Command failed: dfu-util --version
'dfu-util' is not recognized as an internal or external command,
operable program or batch file.

But still - able to build and flash project without errors.

After:
configure ESP-IDF extension with ESP-IDF v5.0. Embed Python is 3.11.2 and virtual environment is created.
Able to build and flash project 👍

@AndriiFilippov
Copy link
Collaborator

@brianignacio5

Tested on:
Windows 10 / Linux Ubuntu

LGTM 👍

@brianignacio5 brianignacio5 merged commit a305386 into master Aug 24, 2023
5 checks passed
@brianignacio5 brianignacio5 deleted the bugfix/embed-python-version branch August 24, 2023 08:20
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

Successfully merging this pull request may close these issues.

ESP-IDF instalation failed on Creating a new Python environment (VSC-1158)
3 participants