Honestly, I think Ive deleted something but not sure when or where.
Traceback (most recent call last):
File “/usr/local/bin/platformio”, line 7, in
from platformio.main import main
ImportError: No module named platformio.main
I’ve done a fresh install of VS and platformio but I still get this.
Seems like you have installed PlatformIO globally. Try and use the isolated environment that is automatically installed with the VSCode plugin and uninstall the global installation (pip3 uninstall platformio etc.)
I tried both those commands and this is the outcome
MacBook-Pro:~ user$ sudo apt remove platformio
Password:
Unable to locate an executable at “/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/bin/apt” (-1)
MacBook-Pro:~ user$ pip uninstall platformio
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see ImportError in system pip wrappers after an upgrade · Issue #5599 · pypa/pip · GitHub for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with ‘-m pip’ instead of running pip directly.
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at Release process - pip documentation v24.1.dev0 pip 21.0 will remove support for this functionality.
WARNING: Skipping platformio as it is not installed.
MacBook-Pro:~ user$