How to fix 'command not found: pio' even though PlatformIO is installed
Problem:
You have installed PlatformIO on your computer using Visual Studio code, however when you try to run it in your terminal/shell, you see:
pio_not_found_output.txt
$ pio
zsh: command not found: pioSolution
PlatformIO is installed in $HOME/.platformio, but not added to the PATH environment variable, so your terminal can’t find it. Add it using
add_platformio_path.sh
echo "export PATH=\$PATH:/home/${USER}/.platformio/penv/bin" >> ~/.profileand then logout from your current session and log back in again (or reboot) in order for the changes to take effect. After that, you can run pio from any shell.
Check out similar posts by category:
Linux, PlatformIO
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow