Fantastic news!
Good move!
Although using pip to install platformio has added another unknown element though. I have not tried using pip myself. However, we need to try and establish if the “-bash: pio: command not found” error is because it isn’t there or whether it’s the wrong user level. I suspect it’s an incomplete installation because maybe it needed to be
sudo pip install -U platformio
so that pip was run with a high enough permission level to make changes to the root file system, eg adding the pio executable to the “PATH”. I’m guessing a bit here and carrying over my experience of using the platformio “easy install” command line, it seems to install ok without sudo, but then it won’t work, re-running it with sudo seemed to fix the issue.
Since pip is a package installer, you might need to remove the current installation before you can reinstall with “sudo”.
First try
pio --version
should fail as above
sudo pio --version
not sure, but I suspect this might fail too
just check to see if either of the executables are present, here’s mine
pi@raspberrypi:~ $ ls -la /usr/local/bin/pio
-rwxr-xr-x 1 root staff 221 Mar 30 15:06 /usr/local/bin/pio
pi@raspberrypi:~ $ ls -la /usr/local/bin/platformio
-rwxr-xr-x 1 root staff 221 Mar 30 15:06 /usr/local/bin/platformio
I’m guessing the’re not there, if you want to double check there not somewhere else you can use the whereis
command eg
pi@raspberrypi:~ $ whereis platformio
platformio: /usr/local/bin/platformio
pi@raspberrypi:~ $ whereis pio
platformio: /usr/local/bin/pio
but, it might be time to try and reinstall using sudo
sudo pip install -U platformio
if it complains that it’s already installed or that it’s already the latest version, we need to remove it first.
pip uninstall platformio
then try installing with again with sudo.
to test use pio --version
, if that doesn’t work try checking for the executables as we did above.
That’s cool! I also suspect make will work no problems, it is much simpler than pio. for the record it’s also much faster than pio on a RPi, so although you might eventually prefer to use make over pio, I appreciate you helping resolve this as I’m sure there will be many others that hit a similar snag.
I’m still unclear about how and when startx interferes with the mounting as I tried every which way last night to get the mounting to fail and couldn’t, I used startx from boot, I rebooted with the Nucleo attached and unattached, I could not replicate what you have seen (yet).
The question over using sudo or not when installing is less of an option than platformio make out. Thier documentation is peppered with lines like
“To install or upgrade PlatformIO paste that at a Terminal prompt (MAY require administrator access sudo):”
and
“To install or upgrade PlatformIO, download (save as…) get-platformio.py script. Then run the following (MAY require administrator access sudo):”
All of the places the pio or pip installer could install the executables are owned by root, so if you are not the “root” user (or belong to the “staff” group) you must use sudo
, if you are the root user, sudo has no effect, so why they do not just include sudo with these commands as standard I have no idea. Nor do I understand why the installer does not alert the user that it has failed to create/copy certain crucial files.
My fingers are crossed for you.