That should list all the executable pio filenames on your system – well, on your PATH. Mine (Linux Mint 19.3) shows me this:
norman@Hubble:~$ whereis pio
pio: /usr/local/bin/pio /home/norman/.local/bin/pio
As you can see, I have two. Which one is at the top?
which pio
/home/norman/.local/bin/pio
Now, is it a file or a sym-link, or not?
ls -l /home/norman/.local/bin/pio
-rwxr-xr-x 1 norman norman 222 Oct 30 16:36 /home/norman/.local/bin/pio
So, at least in my terminal session, the highest pio on my PATH is an actual file. What kind of file?
file /home/norman/.local/bin/pio
/home/norman/.local/bin/pio: Python script, ASCII text executable
It might be interesting to see what your system comes back with, if anything. nce you have tried this out in a terminal session, do it all again in a VSCode “terminal->New Terminal” session and see if you get the same/different results.
max@max-VirtualBox:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
max@max-VirtualBox:~$ pio --version
PlatformIO, version 5.0.2b5
max@max-VirtualBox:~$ which pio
/home/max/.local/bin/pio
max@max-VirtualBox:~$ ls -la $(which pio)
-rwxrwxr-x 1 max max 218 Nov 14 19:11 /home/max/.local/bin/pio
max@max-VirtualBox:~$ head -n10 $(which pio)
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import re
import sys
from platformio.__main__ import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
Have you seen a warning about bad using PlatformIO from the root? We don’t need system permissions. Please remove duplicated PlatformIO Core from your system and DO NOT INSTALL it manully. The latest stable version comes with PlatformIO IDE extrension.
oleg@bb3:~/pio/homie_lamp_cabinet_V5$ whereis pio
pio: /home/oleg/.platformio/penv/bin/pio
oleg@bb3:~/pio/homie_lamp_cabinet_V5$ which pio
/home/oleg/.platformio/penv/bin/pio
oleg@bb3:~/pio/homie_lamp_cabinet_V5$
removed all, all off platformio’s,vscode,.platformio and .vscode dir in home, reinstall vscode and add platformio as extension!
but have no success result
different only in path
“/home/norman/.local/bin/pio” - work
“/home/oleg/.platformio/penv/bin/pio” in my case don’t work - but i install platformio via vscode extension install interface - what i do wrong?
Not working for me, after last update of VSCode, and following your steps, I have:
~/.platformio/penv/bin/pio system info
-------------------------- -------------------------------------------
PlatformIO Core 5.0.3
Python 3.7.3-final.0
System Type linux_x86_64
Platform Linux-4.19.0-10-amd64-x86_64-with-glibc2.28
File System Encoding utf-8
Locale Encoding UTF-8
PlatformIO Core Directory /mnt/opt/platformio
PlatformIO Core Executable /usr/local/bin/platformio
Python Executable /home/avp/.platformio/penv/bin/python
Global Libraries 0
Development Platforms 10
Tools & Toolchains 32
-------------------------- -------------------------------------------
works fine via command line, but in the VSCode IDE I have:
> Executing task: pio run <
The terminal process failed to launch: Path to shell executable "pio" is not a file of a symlink.
Terminal will be reused by tasks, press any key to close it.
Indeed I tested on 1.50.1 with my screenshot above and it worked fine, but I’ve also just updated to 1.51.1 and still works perfectly fine there. All on Ubuntu 20.04 LTS.
which pio
# save output to clipboard
cat $(which pio) > ~/custom_pio
chmod +x ~/custom_pio
rm $(which pio)
ln -s ~/custom_pio path_from_which_pio_output
# should still go through
pio --version
that’s not working too. For other side, I didn’t understand why you mentioned that I’m using hack version or custom version? I installed it from curl command like @ivankravets wrote.
Ok, I fixed the issue. I don’t know but in the last version it not accept that you have directory in home called pio or a link symbolic with this name. In a old version of vscode that I tryed (1.46.1-1592428892), the message is clear: “pio is a directory”, in the last version the error message is “pio is not a file of a symlink”.
Is weird it because I have it many months ago, a directory pio for my all projects
Maybe do you have in your path some directory with name pio ? I resolved the same issue that you have when I renamed my project directory pio to any name.
You RIGHT!!!
I have in home folder with name “pio” - before vscode 1.51 all work ok, but whe i update to 1.51 - it’s broken, and when i rename “pio” to “pio_” all work like a charm! Thank ALL for you help…