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

I seem to have been trapped by the same thing. I got the error: The terminal process failed to launch: Path to shell executable "platformio" is not a file or a symlink. After renaming the folder home/<user>/Code/platformio/ the error was gone.</user>