I'm sure there's a fairly easy fix for this, but I haven't been able to make anything I've found in the forums work for me.
I'm attempting to install the ESP32 toolchain. I followed exactly the clear instructions posted here: https://www.flowcode.co.uk/wiki/index.p ... _Toolchain
The install seems to have gone well, but when I attempt to compile a simple blink project it appears that esp-ide is trying to use Python 2.7 instead of the Python 3 it installed in the installation process.
From the compilation output:
Code: Select all
Checking if Python packages are up to date...
The following Python requirements are not satisfied:
setuptools>=21
click>=5.0
pyserial>=3.0
future>=0.15.2
cryptography>=2.1.4,<35
cffi<1.15;python_version<'3.6'
pyparsing>=2.0.3,<2.4.0
pyelftools>=0.22
idf-component-manager~=1.0
gdbgui==0.13.2.0; python_version < "3.11"
pygdbmi<=0.9.0.2; python_version < "3.11"
python-socketio<5; python_version < "3.11"
pygdbmi<=0.9.0.2; python_version > "3.10"
reedsolo>=1.5.3,<=1.5.4
bitstring>=3.1.6,<4
ecdsa>=0.16.0
esp-windows-curses; sys_platform == 'win32'
Please follow the instructions found in the "Set up the tools" section of ESP-IDF Getting Started Guide
Diagnostic information:
IDF_PYTHON_ENV_PATH: (not set)
Python interpreter used: C:\Python27\python.exe
Warning: python interpreter not running from IDF_PYTHON_ENV_PATH
Code: Select all
Using Python in C:\Users\thisUser\AppData\Local\Programs\Python\Python37\
Python 3.7.3
Checking if Python packages are up to date...
Python requirements from C:\esp-idf\requirements.txt are satisfied.
Done! You can now compile ESP-IDF projects.
Code: Select all
C:\Users\thisUser>python
Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

Thanks in advance...
More info:
1. esp-idf command prompt (cmd.exe):
Code: Select all
Using Python in C:\Users\thisUser\AppData\Local\Programs\Python\Python37\
Python 3.7.3
Using Git in C:\Program Files\Git\cmd\
git version 2.21.0.windows.1
Setting IDF_PATH: C:\esp-idf
Adding ESP-IDF tools to PATH...
C:\esp-idf-tools\tools\xtensa-esp32-elf\esp-2020r3-8.4.0\xtensa-esp32-elf\bin
C:\esp-idf-tools\tools\xtensa-esp32s2-elf\esp-2020r3-8.4.0\xtensa-esp32s2-elf\bin
C:\esp-idf-tools\tools\esp32ulp-elf\2.28.51-esp-20191205\esp32ulp-elf-binutils\bin
C:\esp-idf-tools\tools\esp32s2ulp-elf\2.28.51-esp-20191205\esp32s2ulp-elf-binutils\bin
C:\esp-idf-tools\tools\cmake\3.16.4\bin
C:\esp-idf-tools\tools\openocd-esp32\v0.11.0-esp32-20220706\openocd-esp32\bin
C:\esp-idf-tools\tools\ninja\1.10.0\
C:\esp-idf-tools\tools\idf-exe\1.0.1\
C:\esp-idf-tools\tools\ccache\3.7\
C:\esp-idf-tools\tools\dfu-util\0.9\dfu-util-0.9-win64
C:\esp-idf-tools\python_env\idf4.2_py3.7_env\Scripts
C:\esp-idf\tools
Checking if Python packages are up to date...
Python requirements from C:\esp-idf\requirements.txt are satisfied.
Done! You can now compile ESP-IDF projects.
Go to the project directory and run:
idf.py build
C:\esp-idf>
Code: Select all
C:\Users\thisUser>python
Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
Code: Select all
Target folder: C:\MPLAB Projects\FC10_testing
Source name: C:\MPLAB Projects\FC10_testing\Flowcode1_esp32.fcfx
Title:
Description:
Device: ESP.ESP32.ESP32_WROOM_32
Generated by: Flowcode v10.0.4.33
Date: Friday, August 18, 2023 10:55:20
Users: 1
Registered to: chico (FREE_VERSION)
Licence key: DF7JCQ
NOT FOR COMMERCIAL USE
https://www.flowcode.co.uk
Using FCD settings for compiler
Launching the compiler...
C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\ESP\Batch\esp32_build.bat "C:\esp-idf\" "Flowcode1_esp32" "C:\MPLAB Projects\FC10_testing\" esp32s_sdkconfig esp32
C:\MPLAB Projects\FC10_testing>REM CRC: 0796FC1E6A776AF9156B257209C35258CE7C28B3EC20AEA2C632DB392A0E4BFD5B3F53B21811978F7B21FE4085045A7E774D1D3D69D8A99EE7320EAE740A5DB6CB88D63C2D6E3613A41BF517A6FEAF3A3307584D5060F214711B8143522C2B69DED9A8239BD70B72B199900461C78937B42DEF8219F63A24580137A2F6C8FDB7553324EFF791947E8AB6FFD612B81BAA97C798A8F1CFC189DE5D38517747C774AF2DD6F839BAECF83F7F994C7164CE77868F480396BDEF2F2C3050DA273BE4EE1A93B7F4BABD60587FC07671DDE8C8B7571E128FEF13BA27
C:\MPLAB Projects\FC10_testing>REM REVISION: 8.0
C:\MPLAB Projects\FC10_testing>REM GUID: 955EA920-4961-4C53-BA6B-EF4AF66BB4C2
C:\MPLAB Projects\FC10_testing>REM DATE: 09\08\2023
C:\MPLAB Projects\FC10_testing>REM DIR: FCD\ESP\Batch\esp32_build.bat
.
============================== Toolchain Check ==============================
Python 2.7.10
git version 2.21.0.windows.1
ESP toolchain found at "C:\esp-idf\"
=============================================================================
.
Building: Flowcode1_esp32 ...
IDF Version: v4.2.5-1-g5f8de192fa ...
Setting IDF_PATH: C:\esp-idf
Adding ESP-IDF tools to PATH...
C:\esp-idf-tools\tools\idf-exe\1.0.1\
C:\esp-idf-tools\tools\cmake\3.16.4\bin
C:\esp-idf-tools\tools\openocd-esp32\v0.11.0-esp32-20220706\openocd-esp32\bin
C:\esp-idf-tools\tools\dfu-util\0.9\dfu-util-0.9-win64
C:\esp-idf-tools\tools\xtensa-esp32s2-elf\esp-2020r3-8.4.0\xtensa-esp32s2-elf\bin
C:\esp-idf-tools\tools\xtensa-esp32-elf\esp-2020r3-8.4.0\xtensa-esp32-elf\bin
C:\esp-idf-tools\tools\esp32ulp-elf\2.28.51-esp-20191205\esp32ulp-elf-binutils\bin
C:\esp-idf-tools\tools\ninja\1.10.0\
C:\esp-idf-tools\tools\esp32s2ulp-elf\2.28.51-esp-20191205\esp32s2ulp-elf-binutils\bin
C:\esp-idf-tools\tools\ccache\3.7\
C:\esp-idf\tools
Checking if Python packages are up to date...
The following Python requirements are not satisfied:
setuptools>=21
click>=5.0
pyserial>=3.0
future>=0.15.2
cryptography>=2.1.4,<35
cffi<1.15;python_version<'3.6'
pyparsing>=2.0.3,<2.4.0
pyelftools>=0.22
idf-component-manager~=1.0
gdbgui==0.13.2.0; python_version < "3.11"
pygdbmi<=0.9.0.2; python_version < "3.11"
python-socketio<5; python_version < "3.11"
pygdbmi<=0.9.0.2; python_version > "3.10"
reedsolo>=1.5.3,<=1.5.4
bitstring>=3.1.6,<4
ecdsa>=0.16.0
esp-windows-curses; sys_platform == 'win32'
Please follow the instructions found in the "Set up the tools" section of ESP-IDF Getting Started Guide
Diagnostic information:
IDF_PYTHON_ENV_PATH: (not set)
Python interpreter used: C:\Python27\python.exe
Warning: python interpreter not running from IDF_PYTHON_ENV_PATH
PATH: C:\esp-idf-tools\tools\idf-exe\1.0.1\;C:\esp-idf-tools\tools\cmake\3.16.4\bin;C:\esp-idf-tools\tools\openocd-esp32\v0.11.0-esp32-20220706\openocd-esp32\bin;C:\esp-idf-tools\tools\dfu-util\0.9\dfu-util-0.9-win64;C:\esp-idf-tools\tools\xtensa-esp32s2-elf\esp-2020r3-8.4.0\xtensa-esp32s2-elf\bin;C:\esp-idf-tools\tools\xtensa-esp32-elf\esp-2020r3-8.4.0\xtensa-esp32-elf\bin;C:\esp-idf-tools\tools\esp32ulp-elf\2.28.51-esp-20191205\esp32ulp-elf-binutils\bin;C:\esp-idf-tools\tools\ninja\1.10.0\;C:\esp-idf-tools\tools\esp32s2ulp-elf\2.28.51-esp-20191205\esp32s2ulp-elf-binutils\bin;C:\esp-idf-tools\tools\ccache\3.7\;C:\esp-idf\tools;C:\Program Files\Parallels\Parallels Tools\Applications;C:\Python27\;C:\Python27\Scripts;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microchip\MPLAB C32 Suite\bin;C:\Program Files (x86)\Microchip\xc8\v1.43\bin;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Microchip\xc8\v2.31\bin;C:\Program Files\Git\cmd;C:\Program Files (x86)\Mitov\Visuino;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin;C:\Program Files (x86)\IVI Foundation\IVI\bin;C:\Program Files\IVI Foundation\IVI\bin;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin\;C:\Program Files\IVI Foundation\VISA\Win64\Bin\;C:\Users\jduncan\AppData\Local\Programs\Python\Python37\Scripts\;C:\Users\jduncan\AppData\Local\Programs\Python\Python37\;C:\Users\jduncan\AppData\Local\Microsoft\WindowsApps;;C:\Users\jduncan\AppData\Local\Programs\Microsoft VS Code Insiders\bin
Target: esp32 ...
Traceback (most recent call last):
File "C:\esp-idf\tools\idf.py", line 45, in <module>
from idf_py_actions.tools import (executable_exists, idf_version, merge_action_lists, realpath) # noqa: E402
File "C:\esp-idf\tools\idf_py_actions\tools.py", line 1, in <module>
import click
ImportError: No module named click
Build Failed
C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\ESP\Batch\esp32_build.bat reported error code 0x1
Autoclose turned off
FINISHED