ESP-IDF vscode extension defaults to Python 2.7 venv
Posted: Sun May 23, 2021 12:40 pm
Hello folks, I am testing the ESP-IDF environment (1.0.3) within vscode under Ubuntu 18.04LTS.
When running the debug (ESP-prog, ESP32 DOIT target), the ESP-IDF interface throws a syntax error,
This looks like a Python 3 keyword used in a Python 2 environment, and sure enough running a 'ESP-IDF terminal' shows 2.7, while the bash terminal in vscode is 3.6
also gives Python 2.7.17, this is the Python venv location specified in "idf.pythonBinPath", in my installation settings.json
Ubuntu uses Python 2 as default, but I had changed this to Python 3.6, verified in a bash terminal.
My question is whether ESP-IDF vscode extension requires Python 2 (which would require a debug rewrite), or how it is possible to force use of Python to 3 for the ESP-IDF vscode environment.
Are there further steps required to force use of Python 3 using the 'ESP-IDF: Configure ESP-IDF extension' script?
I note that pip fails when 'python3' option is selected for this script install.
When running the debug (ESP-prog, ESP32 DOIT target), the ESP-IDF interface throws a syntax error,
Code: Select all
File "/home/foobert/.vscode/extensions/espressif.esp-idf-extension-1.0.3/esp_debug_adapter/debug_adapter/debug_backend/debug_backend/gdb.py", line 471
nonlocal target_output
^
SyntaxError: invalid syntax
[Stopped] : ESP-IDF Debug Adapter
Code: Select all
python --version
Code: Select all
.espressif/python_env/idf4.2_py3.6_env/bin/python --version
Ubuntu uses Python 2 as default, but I had changed this to Python 3.6, verified in a bash terminal.
My question is whether ESP-IDF vscode extension requires Python 2 (which would require a debug rewrite), or how it is possible to force use of Python to 3 for the ESP-IDF vscode environment.
Are there further steps required to force use of Python 3 using the 'ESP-IDF: Configure ESP-IDF extension' script?
I note that pip fails when 'python3' option is selected for this script install.