安装步骤
something went wrong while getting the serial port list问题
找到错误日志
Windows:%USERPROFILE%.vscode\extensions\espressif.esp-idf-extension-VERSION\esp_idf_vsc_ext.log
Linux 和 MacOSX: $HOME/.vscode/extensions/espressif.esp-idf-extension-VERSION/esp_idf_vsc_ext.log
找到这以下内容
{"user":true,"message":"Something went wrong while getting the serial port list","stack":"Error: non zero exit code 1\r\n\r\nPyserial is not installed for C:\\Users\\DaKeAi\\AppData\\Local\\Programs\\Python\\Python310\\python.exe. Please, check that IDF dependencies are installed.\r\n\n\tat ChildProcess.<anonymous> (\\dist\\extension.js:2:1394091)\n\tat ChildProcess.emit (node:events:514:28)\n\tat ChildProcess.emit (node:domain:488:12)\n\tat ChildProcess._handle.onexit
注意里面最重要的内容
Pyserial is not installed for C:\\Users\\DaKeAi\\AppData\\Local\\Programs\\Python\\Python310\\python.exe
意思是没有安装到Pyserial
模块
安装Pyserial
安装pyserial之前可以先给pip换源,打开cmd
命令行输入pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
命令换源到清华镜像
进入上述目录C:\Users\DaKeAi\AppData\Local\Programs\Python\Python310
,按住shift
键的同时点击鼠标左键打开菜单选择在此处打开shellpower,输入安装命令
python.exe -m pip install pyserial
安装完成后输入python.exe -m pip list
命令查看是否安装完成
可以看到pyserial
模块已经安装完成了
最后
重启vscode
问题应该会解决了