Cómo solucionar PlatformIO: 'Can not find working Python 3.6+ interpreter' en Linux

Problema:

Al intentar abrir PlatformIO en Visual Studio Code, ves el siguiente mensaje de error:

error.txt
PlatformIO: Can not find working Python 3.6+ Interpreter. Please install the latest Python 3 and restart VSCode

VSCode error message showing PlatformIO cannot find working Python 3.6 interpreter

a pesar de que ya tienes Python3 instalado.

Solución

El problema aquí no es que PlatformIO no pueda encontrar Python 3, ¡es que no tienes venv (entornos virtuales) instalado para tu versión de Python!

En Ubuntu/Debian, puedes instalarlo usando

install_venv.sh
sudo apt -y install python3-venv

Alternativamente puedes instalarlo usando pip:

install_virtualenv.sh
pip install virtualenv

Echa un vistazo a artículos similares por categoría: PlatformIO Python