Problem with PlatformIO installation on VSCode

Hi,
I use following setup for platformIO
Win10 64 bit 10.0.17763
VSCode 1.39.1
Platform IO 1.9.0

I have tried to make a clean install of platformIO on my system twice and stiil the PlatformIO generates following errors once I call them using CTRL+SHIFT+P in vscode

PlatformIO: Home --> Error: command ‘platformio-ide.home’ not found
PlatformIO: Build --> Error: command ‘platformio-ide.build’ not found
PlatformIO: Clean --> Error: command ‘platformio-ide.clean’ not found

I have done the following steps in advance to make platformIO re-installation to work properly, but still nothing has worked for me.

(1) Uninstalling the PlatformIO extension in vscode
(2) Erasing all the %USERNAME%.vscode\extensions\platformio.platformio-ide-1.9.0 folder
(3) Erasing the old %USERNAME%.platformio folder

Even there is no platformIO home icon bottom-left of the vscode.
I can not run pio command under the vscode terminal (command is not found).

I am wondering how I can solve the issue with my platformIO installation to make it work as before.
Thanks in advance.

1 Like

Try turning on the debug console…

image

… and see what errors get reported…

At a guess, you’ve probably been unlucky enough to encounter problems with the change to python3 in the 1.9.0 PlatformIO extension. At a pinch, if you just need it working again, you could probably try re-installing 1.8.3, but it would be better if you can help get to the bottom of this issue so it doesn’t happen again for someone else.

image

1 Like

Thank you pfeerick,
I have applied your suggestion, and I got a screenshot of the problem
My system has Python 3.7.3-64bit in it’s PATH


Kindly let me know-how can I solve this issue since I did not get much information
I from the screenshot.
Thanks

When you open VSCode, do you get the following in the terminal panel every time VScode opens?

Installing PlatformIO Core...
Please do not close this window and do not open other folders until this process is completed.
Failed to install PlatformIO IDE.

i.e. does it think it needs to install still?

And can you have a look that this issue, and double check it doesn’t apply to you?

I’ve opened this issue on GitHub so it can be investigated further.

Hi, The problem is not similar to the one that you have mentioned, platformIO seems to install correctly without issue (I do not know how to read the extension installation logs) but once it the platformIO extension is installed it shows uninstall icon.

Regarding the platformIO after installation it does not even load at all, even I reopen vscode no home icon or anything else it fails in the very first stage of loading and generates the errors that I have mentioned earlier.

still I would like to know if there is something that I can figure out more about the issue?
Thanks in advance

I thought as much…

You could try opening the developer tools console again, and then go View -> Command Palette -> reload window (Developer: Reload Window`) and see if there are any startup errors… e.g. this is what my startup looks like…

Hi,
I have done Developer: Reload Window in the command pallate and I got following

I get following when I execute PlatformIO: Home

  1. Try to uninstall all Python interpreters from the system
  2. Install the Python interpreter as described at Redirecting...
  3. Remove USERPROFILE/.platformio folder
  4. Restart VSCode.
1 Like

Hi ivan,
I partially solved the problem as follows,
(1) Uninstalling all the python installations in Windows
(2) Checking if the Python 3.8.0 (64bit) is in the windows path
(3) Taking out all the previous path related to Python
(4) Uinstalling the PlatformIO extension in vscode (if exists)
(4) Erasing all the following folders
%USERPROFILE%.platformio
%USERPROFILE%.vscode\extensions\platformio.platformio-ide-1.9.0
(5) Re-installing the platformIO extension inside the vscode
(6) Reloading vscode.

----------------- All works fine and the platformIO home does show up but following error occurs --------------
Following error occures when I am going to login into platformIO account.
Could not load PIO Account information

PIO Core Call Error: “spawnProcess not available since pywin3sdd2 is not installed.”

I do not know if there is any remedy for the login issue or not?
Thanks in advance

1 Like

Thanks, fixed! Please open PlatformIO IDE Terminal and type pio update or VSCode > Left Sidebar > PlatformIO > Update…

1 Like

Hi,
Would you mind show me (screenshot) where I can Update platformIO,
Both in terminal (in my terminal there is no pio in the env path).
Will you update the fixed version of platformIO on the VSCode website too.
Thanks in advance

There is a terminal icon on the bottom toolbar

26

1 Like

I have the same problem. New Windows 10 laptop, nothing else of relevance installed.
Tried to install, uninstall, reinstall, and delete .platformio folders many times.
I installed latest python (3.8.1, installs 32bit) and made sure it’s in the PATH.
PlatformIO installs correctly, “alien” icon shows up, but no commands in toolbar nor on left box (see picture)

command palette shows commands (e.g. “build”) but when I select it from command palette, I get error “command ‘platformio-ide.build’ not found” (see pic for “alien”, platformio versions, lack of icons / commands and error in lower right)
I’ll check the debug console but maybe someone can already tell me where to look … thanks

Error: Error: Command failed: global --encode-path " " -f "c:\Users\Massi\Dropbox\___STARTUPS_VARIE\CODE\PlatformIO\CheckPins\src\main.cpp"'global' is not recognized as an internal or external command,
operable program or batch file.
 `global --encode-path " " -f "c:\Users\Massi\Dropbox\___STARTUPS_VARIE\CODE\PlatformIO\CheckPins\src\main.cpp"` (exited with error code 1)

ok, what seemed to solve for now is this (I have all my platformio projects in a dir that is synced among computers via dropbox). I am used to open the containing folder as a workspace, as it worked on my old laptop. Like this.

WORKSPACE_FOLDER\PlatformIO_proj1
WORKSPACE_FOLDER\PlatformIO_proj2
...

and so on. so opening WORKSPACE_FOLDER as either a workspace or a folder works on old laptop but not on new one.

This does not work on new laptop. Both laptops are running same sw version of everything, but there must have been something that made the difference. Maybe because in the old laptop i “grew” my project dir and workspace one at a time?

anyway, by doing what was suggested here, I managed to get platformio to work for now.

  1. open just one of the projects as a folder e.g. WORKSPACE_FOLDER\PlatformIO_prj1. PlatformIO commands should be available now.
  2. add all other project folders inside WORKSPACE_FOLDER as extra folders. so far, if I try to include WORKSPACE_FOLDER itself, PlatformIO will stop working again.

Hope this helps in troubleshooting / making a future better user experience

1 Like

You need to open PlatformIO Project per workspace. Extension looks for platormio.ini file in the root of project folder.

4 Likes

You can’t open the WORKSPACE_FOLDER directly for multi-root projects. You need to do what you did… open one of them, and then add all the remainder, which you should be able to do in one hit, since you can either drag them all into the file explorer panel, or multi-select in the Add Folder To Workspace... dialog.

By opening the WORKSPACE_FOLDER directly, VSCode doesn’t treat it as multiple independent projects/folders, hence why it doesn’t work, and why the PlatformIO extension doesn’t see the requisite platformio.ini in the root of the folder.

1 Like

@ivankravets @pfeerick thanks!

1 Like

Hey mates, I am trying to install platformio on my vscode and I am getting this error, “PlatformIO: Can not find working Python 2.7 or 3.5+ Interpreter. Please install the latest Python 3 and restart VSCode” I did what the message suggests, I did try in many ways with no luck.
could you please give me a hand?.