platformio-core-installer
platformio-core-installer copied to clipboard
subprocess.CalledProcessError
Solutions
There are a few workarounds for this issue. Please try them from 1 to 3. If first does not work, then next, etc.
Solution 1
- Press Windows
- Start typing: App Execution Aliases
- Disable Python and Python3
- Restart VSCode.
Solution 2
- Create
.platformiofolder in the root ofC:drive (OS drive). - Restart VSCode.
Solution 3
- Install PlatformIO Core manually
- Restart VSCode.
See example

Solution 4
- Navigate to
%USERHOME%folder in a File Explorer and RIGHT click on.platformiofolder -> Properties. If your account name contains NON-ASCII chars, the.platformiofolder will be located in the ROOT of your system drive (for example,C:\.platformio):

- Go to the “Security” tab and click on the “Advanced” option:

- In the Advanced Security Settings window, check the option “Replace all child object permission entries with inheritable permission entries from this object“:

- Now, click on “Apply” and “OK” to save your changes. Close the Explorer and restart your computer. Check if you can access the files on the external drive.
P.S: Credits go to https://thegeekpage.com/fix-the-requested-operation-requires-elevation-error-740-in-windows-10/ (4 Step)
%23 Description of problem Leave a comment...
BEFORE SUBMITTING, PLEASE SEARCH FOR DUPLICATES IN
- https://github.com/platformio/platformio-vscode-ide/issues%3Fq=is%3Aissue
%23 Configuration
VSCode: 1.50.1 PIO IDE: v2.1.0 System: Windows_NT, 10.0.18362, x64
%23 Exception
Error: Traceback (most recent call last):
File "C:\Users\USER\.platformio\.cache\tmp\get-platformio-0.3.5.py", line 69, in <module>
main()
File "C:\Users\USER\.platformio\.cache\tmp\get-platformio-0.3.5.py", line 61, in main
bootstrap()
File "C:\Users\USER\.platformio\.cache\tmp\get-platformio-0.3.5.py", line 47, in bootstrap
pioinstaller.__main__.main()
File "C:\Users\USER\.platformio\.cache\tmp\.piocore-installer-f3auf236\tmplh2w1f4h\pioinstaller.zip\pioinstaller\__main__.py", line 122, in main
File "C:\Users\USER\.platformio\.cache\tmp\.piocore-installer-f3auf236\tmplh2w1f4h\pioinstaller.zip\click\core.py", line 829, in __call__
File "C:\Users\USER\.platformio\.cache\tmp\.piocore-installer-f3auf236\tmplh2w1f4h\pioinstaller.zip\click\core.py", line 782, in main
File "C:\Users\USER\.platformio\.cache\tmp\.piocore-installer-f3auf236\tmplh2w1f4h\pioinstaller.zip\click\core.py", line 1236, in invoke
File "C:\Users\USER\.platformio\.cache\tmp\.piocore-installer-f3auf236\tmplh2w1f4h\pioinstaller.zip\click\core.py", line 1066, in invoke
File "C:\Users\USER\.platformio\.cache\tmp\.piocore-installer-f3auf236\tmplh2w1f4h\pioinstaller.zip\click\core.py", line 610, in invoke
File "C:\Users\USER\.platformio\.cache\tmp\.piocore-installer-f3auf236\tmplh2w1f4h\pioinstaller.zip\click\decorators.py", line 21, in new_func
File "C:\Users\USER\.platformio\.cache\tmp\.piocore-installer-f3auf236\tmplh2w1f4h\pioinstaller.zip\pioinstaller\__main__.py", line 52, in cli
File "C:\Users\USER\.platformio\.cache\tmp\.piocore-installer-f3auf236\tmplh2w1f4h\pioinstaller.zip\pioinstaller\core.py", line 72, in install_platformio_core
File "C:\Users\USER\.platformio\.cache\tmp\.piocore-installer-f3auf236\tmplh2w1f4h\pioinstaller.zip\pioinstaller\penv.py", line 75, in create_core_penv
File "C:\Users\USER\.platformio\.cache\tmp\.piocore-installer-f3auf236\tmplh2w1f4h\pioinstaller.zip\pioinstaller\penv.py", line 144, in add_state_info
File "C:\Users\USER\.platformio\python3\lib\subprocess.py", line 411, in check_output
**kwargs).stdout
File "C:\Users\USER\.platformio\python3\lib\subprocess.py", line 512, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['C:\\Users\\USER\\.platformio\\penv\\Scripts\\python.exe', '-c', "import sys
Hi i get this error when installing PlatformIO
Do you use antivirus tools?
I have exactly the same problem with configuration: VSCode: 1.50.1 PIO IDE: v2.1.3 System: Windows_NT x64, 10.0.19041
My problem solved. It is caused by a space in my username. Space is not allowed in the file path of python.
Just tried in a clean VM box and "Don Pedro" works as expected. Please destroy from your system insecure and danger software, such as dr.web, kasperskyi, avast, avg, mcafee, etc.

I had no softwares installed like you mentioned, @ivankravets.
VSCode 1.50.1 Core 5.0.1, Home 3.3.0 Python 3.9 (latest)
@ambarusa could you provide your output from VSCode's console? See my screenshot above. VSCode > Help > Developer tools > Console.
console.ts:137 [Extension Host] Error: Traceback (most recent call last): File "C:\Users\Adam Ambarus.platformio.cache\tmp\get-platformio-0.3.5.py", line 69, in
main() File "C:\Users\Adam Ambarus.platformio.cache\tmp\get-platformio-0.3.5.py", line 61, in main bootstrap() File "C:\Users\Adam Ambarus.platformio.cache\tmp\get-platformio-0.3.5.py", line 47, in bootstrap pioinstaller.main.main() File "C:\Users\Adam Ambarus.platformio.cache\tmp.piocore-installer-4fiaxrjr\tmp1g1qxxyl\pioinstaller.zip\pioinstaller_main_.py", line 122, in main File "C:\Users\Adam Ambarus.platformio.cache\tmp.piocore-installer-4fiaxrjr\tmp1g1qxxyl\pioinstaller.zip\click\core.py", line 829, in call File "C:\Users\Adam Ambarus.platformio.cache\tmp.piocore-installer-4fiaxrjr\tmp1g1qxxyl\pioinstaller.zip\click\core.py", line 782, in main File "C:\Users\Adam Ambarus.platformio.cache\tmp.piocore-installer-4fiaxrjr\tmp1g1qxxyl\pioinstaller.zip\click\core.py", line 1236, in invoke File "C:\Users\Adam Ambarus.platformio.cache\tmp.piocore-installer-4fiaxrjr\tmp1g1qxxyl\pioinstaller.zip\click\core.py", line 1066, in invoke File "C:\Users\Adam Ambarus.platformio.cache\tmp.piocore-installer-4fiaxrjr\tmp1g1qxxyl\pioinstaller.zip\click\core.py", line 610, in invoke File "C:\Users\Adam Ambarus.platformio.cache\tmp.piocore-installer-4fiaxrjr\tmp1g1qxxyl\pioinstaller.zip\click\decorators.py", line 21, in new_func File "C:\Users\Adam Ambarus.platformio.cache\tmp.piocore-installer-4fiaxrjr\tmp1g1qxxyl\pioinstaller.zip\pioinstaller_main_.py", line 52, in cli File "C:\Users\Adam Ambarus.platformio.cache\tmp.piocore-installer-4fiaxrjr\tmp1g1qxxyl\pioinstaller.zip\pioinstaller\core.py", line 72, in install_platformio_core File "C:\Users\Adam Ambarus.platformio.cache\tmp.piocore-installer-4fiaxrjr\tmp1g1qxxyl\pioinstaller.zip\pioinstaller\penv.py", line 75, in create_core_penv File "C:\Users\Adam Ambarus.platformio.cache\tmp.piocore-installer-4fiaxrjr\tmp1g1qxxyl\pioinstaller.zip\pioinstaller\penv.py", line 144, in add_state_info File "C:\Users\Adam Ambarus.platformio\python3\lib\subprocess.py", line 411, in check_output **kwargs).stdout File "C:\Users\Adam Ambarus.platformio\python3\lib\subprocess.py", line 512, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['C:\Users\Adam Ambarus\.platformio\penv\Scripts\python.exe', '-c', "import sys; version=sys.version_info; print('%d.%d.%d'%(version[0],version[1],version[2]))"]' returned non-zero exit status 101. -> Installer version: 0.3.5 Platform: Windows-10 Python version: 3.7.7 (tags/v3.7.7:d7c567b08f, Mar 10 2020, 10:41:24) [MSC v.1900 64 bit (AMD64)] Python path: C:\Users\Adam Ambarus.platformio\python3\python.exe Creating a virtual environment at C:\Users\Adam Ambarus.platformio\penv at c:\Users\Adam Ambarus.vscode\extensions\platformio.platformio-ide-2.1.3\node_modules\platformio-node-helpers\dist\index.js:1:879089 at ChildProcess.c (c:\Users\Adam Ambarus.vscode\extensions\platformio.platformio-ide-2.1.3\node_modules\platformio-node-helpers\dist\index.js:1:878983) at ChildProcess.emit (events.js:223:5) at ChildProcess.cp.emit (c:\Users\Adam Ambarus.vscode\extensions\platformio.platformio-ide-2.1.3\node_modules\cross-spawn\lib\enoent.js:34:29) at maybeClose (internal/child_process.js:1021:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
I hope this is the error log you are interested in, for any additional info, contact me.
Could you open your CMD terminal and type?
"C:\Users\Adam Ambarus\.platformio\penv\Scripts\python.exe" -c "import sys; version=sys.version_info; print('%d.%d.%d'%(version[0],version[1],version[2]))"
Unable to create process using 'C:\Users\Adam Ambarus.platformio\python3\python.exe -c "import sys; version=sys.version_info; print('%d.%d.%d'%(version[0],version[1],version[2]))"'
I get this response in admin mode too.
Unable to create process using
I'm not familiar with Windows OS. I used it 15 years ago last time. What is the reason that you can't call Python from the shell and I can do this from my Windows VM box? Do you use any extra software that protects you?
this command works, if I'm using python.exe from ...\AppData\Local\Programs\Python\Python39
I will come up with more information, after investigation.
@ambarusa were you able to figure this out? I'm having the same issue, except I had PlatformIO working in August, and an update broke it. Reinstalling VS Code and installing old versions of PlatformIO still do not succeed. Deleting the .platformio cache between uninstall and reinstall also does not help.
I do not have any antivirus other than Security Essentials. Disabling Security Essentials real-time protection does not allow for successful installation.
Same issue here. Tried to disable anti-virus, remove .platformio and obsolete VS Code extension folders, but still prompts the same error.
Installing the core in penv via pip install -U platformio works, though. Is there any way to bypass the core installation, and have the VS Code extension to use a pre-installed PIO core, as a temporary workaround?
It looks like an issue with a security policy that does not allow to run PlatformIO Core pio.exe that was installed via Node.JS process (VSCode uses it). Maybe, some Windows updates?
So some combination of uninstalling an old Python, installing a new python, and stopping a program I use called ActualWindowManager, followed by reinstalling VS Code, allowed PlatformIO Core to install. I've never had a problem with ActualWindowManager before, including installing previous versions of PlatformIO (I know I had it working in late August).
I've gotta say, though, the sheer number of errors people are having points to this installation procedure being super brittle. The attitude of "we don't support having Conda installed" and "you must be doing something wrong" is also worrying. I realized this is freeware, but devs dismissing installation issues for something that is designed to be easy-to-use is pretty jarring.
I managed to solve the problem. I found in the logs, that it throwed an The requested operation requires elevation - Error 740 in Windows 10
https://thegeekpage.com/fix-the-requested-operation-requires-elevation-error-740-in-windows-10/
Fix.3 and Fix.4 did the work.
@ambarusa, thank you so much for the solution!!! I've just updated the initial comment.
P.S: Did you change that slider before? How did it happen?
I managed to solve the problem. I found in the logs, that it throwed an The requested operation requires elevation - Error 740 in Windows 10
https://thegeekpage.com/fix-the-requested-operation-requires-elevation-error-740-in-windows-10/Fix.3 and Fix.4 did the work.
Thanks @ambarusa! The same trick works for me. Specifically, I applied Fix 4 on the .platformio folder under my user folder.
Thanks, @MacroYau !!! The guide has been updated in the top comment.
I still don't understand what is the reason. What is your Win 10 edition?
Could you open PlatformIO CLI in VSCode and type?
pio system info
Please share here.
@ivankravets Here's my pio system info output:
-------------------------- ----------------------------------------------------------
PlatformIO Core 5.0.2
Python 3.7.7-final.0
System Type windows_amd64
Platform Windows-10
File System Encoding utf-8
Locale Encoding cp1252
PlatformIO Core Directory C:\Users\Macro Yau\.platformio
PlatformIO Core Executable C:\Users\Macro Yau\.platformio\penv\Scripts\platformio.exe
Python Executable c:\users\macro yau\.platformio\penv\scripts\python.exe
Global Libraries 0
Development Platforms 0
Tools & Toolchains 2
-------------------------- ----------------------------------------------------------
Hope it helps tracing down the issue. Thanks!
@MacroYau What is your Win 10 edition?
I managed to solve the problem. I found in the logs, that it throwed an The requested operation requires elevation - Error 740 in Windows 10
https://thegeekpage.com/fix-the-requested-operation-requires-elevation-error-740-in-windows-10/Fix.3 and Fix.4 did the work.
What do I need to do (fix.3 and fix.4)? I'm a total noob at this
Please scroll up ⬆️ to the beginning. There is a solution for this issue.
I followed the "properties ->advanced, etc...) but still get the same error. platformio will not install, says platformio is not recognized when I try to update all

and this when I first open VSC
I have now tried all 4 fixes and still get the same error
Are you running VSCode as Administrator?
On Thu, Nov 12, 2020, 21:53 KEdwards79 [email protected] wrote:
I have now tried all 4 fixes and still get the same error
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/platformio/platformio-core-installer/issues/221#issuecomment-726305189, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGWNTOJVWGDIJUDXAGWDKXDSPQ4NHANCNFSM4SR7WVTA .
yep, even tried disabling my antivirus. It was working, then the other day I went to install a couple of recommended extensions and after that, Platform IO IDE would not load. Tried uninstalling VSC, the settings folder and the extensions folder, did a clean install, same results. About to just give up at this point lol
I have the same problem, nothing of the above works for me unfortunately.
@MacroYau What is your Win 10 edition?
I am on Windows 10 Enterprise, version 2004 (build 19041.630).