Closed chepo92 closed 3 years ago
Thanks for the verbose logs, @chepo92 !
-- Found Python3: C:/ProgramData/Anaconda3/python.exe (found suitable exact version "3.7.1") found components: Interpreter
@tejlmand that part looks weird, since earlier it says:
Running CMake: 'C:\Program Files\CMake\bin\cmake.EXE' '-DWEST_PYTHON=c:\users\axel.platformio\penv\scripts\python.exe' '-BC:\Users\Axel\zephyrproject\zephyr\build' '-SC:\Users\Axel\zephyrproject\zephyr\samples\subsys\usb\cdc_acm' -GNinja -DBOARD=sam4e_xpro
Seems like there's a bug in the code that should be using WEST_PYTHON for everything if it is set, no?
Yeah, I was searching for similar issues and there is a findpython script in python.cmake that i think is producing this behaviour, https://github.com/zephyrproject-rtos/zephyr/blob/master/cmake/python.cmake
I'm also surprised you're not hitting https://github.com/zephyrproject-rtos/zephyr/blob/e1a6820e4c470ad5693eef469a0f4b61f868d8ec/cmake/west.cmake#L48
I'm also surprised you're not hitting
He does:
CMake Error at C:/Users/Axel/zephyrproject/zephyr/cmake/west.cmake:48 (message): Unable to import west.version from 'C:/ProgramData/Anaconda3/python.exe':
I have two python 3 installations, but cmake fails to find the correct one after using --pristine build option
To Reproduce Steps to reproduce the behavior:
west build -b sam4e_xpro samples/subsys/usb/cdc_acm --pristine
Expected behavior Cmake should pick c:\users\axel.platformio\penv\scripts\python.exe as indicated instead it auto selects C:/ProgramData/Anaconda3/python.exe
I made it work by changing manually the cmakecache:
PYTHON_PREFER_EXECUTABLE:FILEPATH=c:\users\axel\.platformio\penv\scripts\python.exe
after the error is throw, but I have to do it for every new buildEnvironment (please complete the following information):