VS code配置ESP IDF从未成功 [IDFGH-5388]

shenbk
Posts: 4
Joined: Thu Jun 10, 2021 2:45 am

VS code配置ESP IDF从未成功 [IDFGH-5388]

Postby shenbk » Thu Jun 10, 2021 3:06 am

VS code配置ESP IDF没有一次成功的,错误提示主要是python非法,以及cmd.exe找不到。
]4793Q1KA@G5]D[@LBUIK%5.png
]4793Q1KA@G5]D[@LBUIK%5.png (115.8 KiB) Viewed 497 times
]4793Q1KA@G5]D[@LBUIK%5.png
]4793Q1KA@G5]D[@LBUIK%5.png (115.8 KiB) Viewed 497 times
Attachments
~)X2BCB}_SELLYQ1K)X@{SO.png
~)X2BCB}_SELLYQ1K)X@{SO.png (97.17 KiB) Viewed 497 times

shenbk
Posts: 4
Joined: Thu Jun 10, 2021 2:45 am

Re: VS code配置ESP IDF从未成功

Postby shenbk » Thu Jun 10, 2021 3:22 am

附件中可以看出IDF编译环境安装是成功的,而且idf.py build编译例程也正常。

ESP_Gargamel
Posts: 358
Joined: Wed Nov 14, 2018 8:45 am

Re: VS code配置ESP IDF从未成功

Postby ESP_Gargamel » Thu Jun 10, 2021 6:28 am

1、你在 VSC 的 terminal 上执行一下 & 'C:\Program Files\Python38\python.exe' --version,看看输出
2、确认 python 路径是否在 PATH 里,然后 Select Python version 的时候不要选 path 这个,用默认的,看是否可以
3、提供一下 %USERPROFILE%\.vscode\extensions\espressif.esp-idf-extension-VERSION\esp_idf_vsc_ext.log 信息

shenbk
Posts: 4
Joined: Thu Jun 10, 2021 2:45 am

Re: VS code配置ESP IDF从未成功

Postby shenbk » Thu Jun 10, 2021 3:28 pm

已经将python安装到用户默认路径下,并且确认加入了PATH,esp_idf_vsc_ext.log内容如下:
{"message":"spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT","stack":"Error: spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT\n\tat Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)\n\tat onErrorNT (internal/child_process.js:465:16)\n\tat processTicksAndRejections (internal/process/task_queues.js:80:21)","level":"error","timestamp":"2021-06-10T15:22:08.199Z"}
{"user":true,"message":"Git is not found in current environment","stack":"Error: spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT\n\tat Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)\n\tat onErrorNT (internal/child_process.js:465:16)\n\tat processTicksAndRejections (internal/process/task_queues.js:80:21)","level":"error","timestamp":"2021-06-10T15:22:08.200Z"}
{"user":true,"message":"Git is not found in current environment","stack":"Error: git is not found\n\tat Object.<anonymous> (c:\\Users\\admin\\.vscode\\extensions\\espressif.esp-idf-extension-1.0.3\\dist\\extension.js:1:10367)\n\tat Generator.next (<anonymous>)\n\tat s (c:\\Users\\admin\\.vscode\\extensions\\espressif.esp-idf-extension-1.0.3\\dist\\extension.js:1:4154)\n\tat runMicrotasks (<anonymous>)\n\tat processTicksAndRejections (internal/process/task_queues.js:93:5)","level":"error","timestamp":"2021-06-10T15:22:08.203Z"}
{"message":"spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT","stack":"Error: spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT\n\tat Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)\n\tat onErrorNT (internal/child_process.js:465:16)\n\tat processTicksAndRejections (internal/process/task_queues.js:80:21)","level":"error","timestamp":"2021-06-10T15:22:08.207Z"}
{"user":true,"message":"Git is not found in current environment","stack":"Error: spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT\n\tat Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)\n\tat onErrorNT (internal/child_process.js:465:16)\n\tat processTicksAndRejections (internal/process/task_queues.js:80:21)","level":"error","timestamp":"2021-06-10T15:22:08.208Z"}
{"user":true,"message":"Git is not found in current environment","stack":"Error: git is not found\n\tat Object.<anonymous> (c:\\Users\\admin\\.vscode\\extensions\\espressif.esp-idf-extension-1.0.3\\dist\\extension.js:1:10367)\n\tat Generator.next (<anonymous>)\n\tat s (c:\\Users\\admin\\.vscode\\extensions\\espressif.esp-idf-extension-1.0.3\\dist\\extension.js:1:4154)\n\tat runMicrotasks (<anonymous>)\n\tat processTicksAndRejections (internal/process/task_queues.js:93:5)","level":"error","timestamp":"2021-06-10T15:22:08.209Z"}
{"message":"spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT","stack":"Error: spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT\n\tat Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)\n\tat onErrorNT (internal/child_process.js:465:16)\n\tat processTicksAndRejections (internal/process/task_queues.js:80:21)","level":"error","timestamp":"2021-06-10T15:22:08.831Z"}
{"message":"Error looking for python in windows","stack":"Error: spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT\n\tat Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)\n\tat onErrorNT (internal/child_process.js:465:16)\n\tat processTicksAndRejections (internal/process/task_queues.js:80:21)","level":"error","timestamp":"2021-06-10T15:22:08.831Z"}
{"message":"spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT","stack":"Error: spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT\n\tat Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)\n\tat onErrorNT (internal/child_process.js:465:16)\n\tat processTicksAndRejections (internal/process/task_queues.js:80:21)","level":"error","timestamp":"2021-06-10T15:22:08.833Z"}
{"message":"Error looking for python in windows","stack":"Error: spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT\n\tat Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)\n\tat onErrorNT (internal/child_process.js:465:16)\n\tat processTicksAndRejections (internal/process/task_queues.js:80:21)","level":"error","timestamp":"2021-06-10T15:22:08.833Z"}
{"message":"spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT","stack":"Error: spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT\n\tat Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)\n\tat onErrorNT (internal/child_process.js:465:16)\n\tat processTicksAndRejections (internal/process/task_queues.js:80:21)","level":"error","timestamp":"2021-06-10T15:22:08.835Z"}
{"message":"Error looking for python in windows","stack":"Error: spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT\n\tat Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)\n\tat onErrorNT (internal/child_process.js:465:16)\n\tat processTicksAndRejections (internal/process/task_queues.js:80:21)","level":"error","timestamp":"2021-06-10T15:22:08.835Z"}
{"message":"spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT","stack":"Error: spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT\n\tat Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)\n\tat onErrorNT (internal/child_process.js:465:16)\n\tat processTicksAndRejections (internal/process/task_queues.js:80:21)","level":"error","timestamp":"2021-06-10T15:22:08.837Z"}
{"user":true,"message":"Git is not found in current environment","stack":"Error: spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT\n\tat Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)\n\tat onErrorNT (internal/child_process.js:465:16)\n\tat processTicksAndRejections (internal/process/task_queues.js:80:21)","level":"error","timestamp":"2021-06-10T15:22:08.838Z"}
{"message":"spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT","stack":"Error: spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT\n\tat Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)\n\tat onErrorNT (internal/child_process.js:465:16)\n\tat processTicksAndRejections (internal/process/task_queues.js:80:21)","level":"error","timestamp":"2021-06-10T15:22:08.841Z"}
{"user":true,"message":"Git is not found in current environment","stack":"Error: spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT\n\tat Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)\n\tat onErrorNT (internal/child_process.js:465:16)\n\tat processTicksAndRejections (internal/process/task_queues.js:80:21)","level":"error","timestamp":"2021-06-10T15:22:08.842Z"}
{"user":true,"message":"Git is not found in current environment","stack":"Error: git is not found\n\tat Object.<anonymous> (c:\\Users\\admin\\.vscode\\extensions\\espressif.esp-idf-extension-1.0.3\\dist\\extension.js:1:10367)\n\tat Generator.next (<anonymous>)\n\tat s (c:\\Users\\admin\\.vscode\\extensions\\espressif.esp-idf-extension-1.0.3\\dist\\extension.js:1:4154)\n\tat runMicrotasks (<anonymous>)\n\tat processTicksAndRejections (internal/process/task_queues.js:93:5)","level":"error","timestamp":"2021-06-10T15:22:08.843Z"}
{"message":"spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT","stack":"Error: spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT\n\tat Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)\n\tat onErrorNT (internal/child_process.js:465:16)\n\tat processTicksAndRejections (internal/process/task_queues.js:80:21)","level":"error","timestamp":"2021-06-10T15:22:08.846Z"}
{"user":true,"message":"Git is not found in current environment","stack":"Error: spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT\n\tat Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)\n\tat onErrorNT (internal/child_process.js:465:16)\n\tat processTicksAndRejections (internal/process/task_queues.js:80:21)","level":"error","timestamp":"2021-06-10T15:22:08.847Z"}
{"user":true,"message":"Git is not found in current environment","stack":"Error: git is not found\n\tat Object.<anonymous> (c:\\Users\\admin\\.vscode\\extensions\\espressif.esp-idf-extension-1.0.3\\dist\\extension.js:1:10367)\n\tat Generator.next (<anonymous>)\n\tat s (c:\\Users\\admin\\.vscode\\extensions\\espressif.esp-idf-extension-1.0.3\\dist\\extension.js:1:4154)\n\tat runMicrotasks (<anonymous>)\n\tat processTicksAndRejections (internal/process/task_queues.js:93:5)","level":"error","timestamp":"2021-06-10T15:22:08.848Z"}
{"message":"spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT","stack":"Error: spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT\n\tat Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)\n\tat onErrorNT (internal/child_process.js:465:16)\n\tat processTicksAndRejections (internal/process/task_queues.js:80:21)","level":"error","timestamp":"2021-06-10T15:23:02.640Z"}
{"user":true,"message":"spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT","stack":"Error: spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT\n\tat Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)\n\tat onErrorNT (internal/child_process.js:465:16)\n\tat processTicksAndRejections (internal/process/task_queues.js:80:21)","level":"error","timestamp":"2021-06-10T15:23:02.641Z"}
{"user":true,"message":"C:\\Users\\admin\\AppData\\Local\\Programs\\Python\\Python38\\python.exe is not valid. (ERROR_INVALID_PYTHON)","stack":"Error: C:\\Users\\admin\\AppData\\Local\\Programs\\Python\\Python38\\python.exe is not valid. (ERROR_INVALID_PYTHON)\n\tat c:\\Users\\admin\\.vscode\\extensions\\espressif.esp-idf-extension-1.0.3\\dist\\extension.js:1:189130\n\tat Generator.next (<anonymous>)\n\tat s (c:\\Users\\admin\\.vscode\\extensions\\espressif.esp-idf-extension-1.0.3\\dist\\extension.js:1:183882)\n\tat processTicksAndRejections (internal/process/task_queues.js:93:5)","level":"error","timestamp":"2021-06-10T15:23:02.643Z"}
{"message":"spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT","stack":"Error: spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT\n\tat Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)\n\tat onErrorNT (internal/child_process.js:465:16)\n\tat processTicksAndRejections (internal/process/task_queues.js:80:21)","level":"error","timestamp":"2021-06-10T15:24:02.947Z"}
{"user":true,"message":"spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT","stack":"Error: spawn C:\\WINDOWS\\system32\\cmd.exe; ENOENT\n\tat Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)\n\tat onErrorNT (internal/child_process.js:465:16)\n\tat processTicksAndRejections (internal/process/task_queues.js:80:21)","level":"error","timestamp":"2021-06-10T15:24:02.948Z"}
{"user":true,"message":"C:\\Users\\admin\\AppData\\Local\\Programs\\Python\\Python38\\python.exe is not valid. (ERROR_INVALID_PYTHON)","stack":"Error: C:\\Users\\admin\\AppData\\Local\\Programs\\Python\\Python38\\python.exe is not valid. (ERROR_INVALID_PYTHON)\n\tat c:\\Users\\admin\\.vscode\\extensions\\espressif.esp-idf-extension-1.0.3\\dist\\extension.js:1:189130\n\tat Generator.next (<anonymous>)\n\tat s (c:\\Users\\admin\\.vscode\\extensions\\espressif.esp-idf-extension-1.0.3\\dist\\extension.js:1:183882)\n\tat processTicksAndRejections (internal/process/task_queues.js:93:5)","level":"error","timestamp":"2021-06-10T15:24:02.950Z"}

shenbk
Posts: 4
Joined: Thu Jun 10, 2021 2:45 am

Re: VS code配置ESP IDF从未成功

Postby shenbk » Thu Jun 10, 2021 3:32 pm

确定GIT与python已经正确安装,否则“esp-idf-tools-setup-2.3.exe”也不可能正常安装,idf.py build能正常编译工程的

ESP_bignacio
Posts: 108
Joined: Wed May 02, 2018 12:12 pm

Re: VS code配置ESP IDF从未成功 [IDFGH-5388]

Postby ESP_bignacio » Fri Jun 11, 2021 7:24 am

由于某些原因,无法生成C:\\WINDOWS\\system32\\cmd.exe,请确保vscode具有可执行访问权限

新的v1.1.0安装git和python

检查终端配置是否正确 https://code.visualstudio.com/docs/edit ... d-terminal

Who is online

Users browsing this forum: No registered users and 8 guests