Path to shell executable "pio" is not a file of a symlink. - help please

After last update vscode to
(Version: 1.51.1
Commit: e5a624b788d92b8d34d1392e4c4d9789406efe8f
Date: 2020-11-10T23:31:29.624Z
Electron: 9.3.3
Chrome: 83.0.4103.122
Node.js: 12.14.1
OS: Linux x64 5.4.0-54-generic)

Have this:

"> Executing task: pio run <
The terminal process failed to launch: Path to shell executable “pio” is not a file of a symlink.
Terminal will be reused by tasks, press any key to close it.
and not reinstall platformio not reinstall vscode (this ver or other old ver) cant got success result :frowning: help please… -
apt uninstall and purge and reinstall have not success too…

Sounds like something weird happened with your versions. I would suggest you do remove the PlatformIO VSCode extension in VSCode and then:

# remove entire PlatformIO core directory
rm -rf ~/.platformio
# remove possible global platformio installations
pip uninstall platformio
pip3 uninstall platformio
sudo -H pip3 uninstall platformio
# install global platformio version
sudo -H pip3 install platformio
# check
pio --version
# reinstall VSCode PlatformIO extension and retry.. 

root@myhost:/tmp# pio --version
PlatformIO, version 5.0.3

i do all step’s what you write, but respond:
"> Executing task: pio run <

The terminal process failed to launch: Path to shell executable “pio” is not a file of a symlink.

Terminal will be reused by tasks, press any key to close it." :frowning:

Does the project compile in a terminal when you cd into the project folder and execute pio run?

it’s work! but why it does not work via standart build button? and how i can repair that?

Please close VSCode, go into your project folder and do a pio init --ide=vscode, in order to regenerate VSCode project files. Then open VSCode again and execute the Build task. Is it still broken?

If yes, open a PIO terminal. Is the command pio --version recognized in there?

root@host:/home/oleg/pio/homie_lamp_cabinet_V5# pio init --ide=vscode
The current working directory /home/oleg/pio/homie_lamp_cabinet_V5 will be used for the project.

The next files/directories have been created in /home/oleg/pio/homie_lamp_cabinet_V5
include - Put project header files here
lib - Put here project specific (private) libraries
src - Put project source files here
platformio.ini - Project Configuration File
Error: Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/platformio/", line 109, in main
    cli()  # pylint: disable=no-value-for-parameter
  File "/usr/lib/python3/dist-packages/click/", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/dist-packages/platformio/commands/", line 44, in invoke
    return super(PlatformioCLI, self).invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/platformio/commands/", line 197, in project_init
  File "/usr/local/lib/python3.8/dist-packages/platformio/ide/", line 124, in generate
    tpl_vars = self._load_tplvars()
  File "/usr/local/lib/python3.8/dist-packages/platformio/ide/", line 76, in _load_tplvars
    tpl_vars.update(load_project_ide_data(self.project_dir, self.env_name) or {})
  File "/usr/local/lib/python3.8/dist-packages/platformio/project/", line 140, in load_project_ide_data
    from import cli as cmd_run
  File "/usr/local/lib/python3.8/dist-packages/platformio/commands/run/", line 24, in <module>
    from platformio.commands.device.command import device_monitor as cmd_device_monitor
  File "/usr/local/lib/python3.8/dist-packages/platformio/commands/device/", line 15, in <module>
    from platformio.commands.device.filters.base import DeviceMonitorFilter
  File "/usr/local/lib/python3.8/dist-packages/platformio/commands/device/filters/", line 15, in <module>
    from import miniterm
ModuleNotFoundError: No module named ''

An unexpected error occurred. Further steps:

* Verify that you have the latest version of PlatformIO using
  `pip install -U platformio` command

* Try to find answer in FAQ Troubleshooting section

* Report this problem to the developers


in terminal vscode:

$ pio --version
PlatformIO, version 5.0.3

oleg@bb3:~/pio/homie_lamp_cabinet_V5$ pip3 install pyserial
Requirement already satisfied: pyserial in /home/oleg/.platformio/penv/lib/python3.8/site-packages (3.4)

Should be solved by doing a sudo -H pip install pyserial in a terminal, if not a sudo apt-get install python3-serial (for debian-like systems)

That’s weird, so inside a PIO CLI terminal, pio is found. Does pio run -t clean and pio run also go through in that terminal?

clean success!
build successfull!

Well I’m on 1.51.1 regarding VSCode and I’m using the latest VSCode PIO extension version and it’s all fine here.


Please show a screenshot of your VSCode IDE when you execute the Build project task.

Another strange thing I notice in your output is that it says “Executing task: pio run” but that actual output should be much more verbose, telling what folder it’s running in and the path to the executable.

Снимок экрана от 2020-11-14 01-00-17

What does VSCode show regarding the list of all extensions? What is the contens of the .vscode/launch.json file in the project?


// PIO Unified Debugger
// Documentation: Redirecting...
// Configuration: Redirecting...

“version”: “0.2.0”,
“configurations”: [
“type”: “platformio-debug”,
“request”: “launch”,
“name”: “PIO Debug”,
“executable”: “/home/oleg/pio/homie_lamp_cabinet_V5/.pio/build/esp12e/firmware.elf”,
“projectEnvName”: “esp12e”,
“toolchainBinDir”: “/home/oleg/.platformio/packages/toolchain-xtensa/bin”,
“preLaunchTask”: {
“type”: “PlatformIO”,
“task”: “Pre-Debug”
“internalConsoleOptions”: “openOnSessionStart”
“type”: “platformio-debug”,
“request”: “launch”,
“name”: “PIO Debug (skip Pre-Debug)”,
“executable”: “/home/oleg/pio/homie_lamp_cabinet_V5/.pio/build/esp12e/firmware.elf”,
“projectEnvName”: “esp12e”,
“toolchainBinDir”: “/home/oleg/.platformio/packages/toolchain-xtensa/bin”,
“internalConsoleOptions”: “openOnSessionStart”

oleg@bb3:~$ code --list-extensions

That doesn’t show the versions. PlatformIO IDE should be at 2.2.1 and C/C++ at 1.1.1.

You may also try and go into the extension sidebar -> PlatformIO IDE -> Settings -> Disable “Use builtin PIO core” and maybe also disable “Use built-in python”. Then restart VSCode and retry.

Снимок экрана от 2020-11-14 01-27-55

this did not get success :frowning:
Снимок экрана от 2020-11-14 01-31-04

How did you install VSCode? With some snap package or a direct .deb install? What’s the exact operating system here?

oleg@bb3:~/pio/homie_lamp_cabinet_V5$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal

I try’ed remove and purge .deb package and install it via snap package but result the same: “Path to shell executable “pio” is not a file of a symlink”

Snap is definitely the wrong way to install it – I’ve only seen reports here that due to the container nature, PlatformIO is unable to access the hardware correctly and can’t find files on the main system. Only .deb installs should be done.

I’m very sure I have a Ubuntu system that’s setup in the same way and doesn’t have the problems you’re describing, but I can check again.