VS Code unable to locate python.exe correctly for executing West

Hello,

I have been trying to correctly setup my nRF Connect inside VS Code.

When I try to execute the command 

west -V

in a nRF Connect window inside VS Code, I get the following error :

Fatal error in launcher: Unable to create process using '"c:\ncs\toolchains\v1.9.1\opt\bin\python.exe"  "d:\ncs\toolchains\v1.9.1\opt\bin\Scripts\west.exe" -help': Impossibile trovare il file specificato.

My PATH environmental variables seem to be correct. I have 

d:\ncs\toolchains\v1.9.1\opt\bin\Scripts\

and

d:\ncs\toolchains\v1.9.1\opt\bin\

but there is no mention of the c:\....

It feels to me like nRF Connect is pointing towards a wrong python.exe.

My python.exe resides in d:\ncs\toolchains\v1.9.1\opt\bin\

How can I fix this and let it work properly?


The same behavior also happens if i navigate to the correct Scripts folder and execute a powershell from there. This is the error i get.

PS D:\ncs\toolchains\v1.9.1\opt\bin\Scripts> west -V
Fatal error in launcher: Unable to create process using '"c:\ncs\toolchains\v1.9.1\opt\bin\python.exe" "D:\ncs\toolchains\v1.9.1\opt\bin\Scripts\west.exe" -V': Impossibile trovare il file specificato.

In case I ask my system "where python" in a PS this is what i get:

where python
D:\ncs\toolchains\v1.9.1\opt\bin\python.exe

Which aims to the correct location.

It feels to me like some of the components are aiming at the wrong location but I cannot find who or where.

Related