Pio not working any more

Ubuntu 24.04 LTS, core 6.1.18 here.

I tried to publish a new version of my library, but:

micha@Nimbus:~/Dokumente/PlatformIO/Projects/eModbus$ pio package publish
Traceback (most recent call last):
  File "/home/micha/.local/bin/pio", line 5, in <module>
    from platformio.__main__ import main
ModuleNotFoundError: No module named 'platformio'

What?! Why is pio not working any more in the VSC terminal?

Please see Install Shell Commands — PlatformIO latest documentation

Edit:
Did you open a VS Code terminal or a PlatformIO terminal?

A VS Code terminal I think. My .local/bin looks reasonable IMHO:

icha@Nimbus:~/Dokumente/PlatformIO/Projects/eModbus$ ls -latr ~/.local/bin/p*
-rwxrwxr-x 1 micha micha  218 Mai  1  2024 /home/micha/.local/bin/platformio
-rwxrwxr-x 1 micha micha  238 Mai  1  2024 /home/micha/.local/bin/piodebuggdb
-rwxrwxr-x 1 micha micha  218 Mai  1  2024 /home/micha/.local/bin/pio
micha@Nimbus:~/Dokumente/PlatformIO/Projects/eModbus$ echo $PATH
/home/micha/perl5/bin:/home/micha/.local/bin:/home/micha/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin

Open a PlatformIO terminal as shown in the screenshot above or install the shell commands.

1 Like

Argh. Looks identical, but works differently. Thanks!