Visual Studio Code extension install error

Hello all

Had a good Google and a look through here but can’t find anything to help me yet so posting a new topic.

Thought I’d have a play with an ESP32 and VS Code/PlatformIO looked like the choice for me but frustrated I can’t get it installed. I’ve manually installed Python and let it add to the path env var and also added the scripts folder but I continually get an error dialogue “Virtualenv Create” with some references to tmp files and finally an OSError “import sys…setup tools pip wheel failed with error code 2”.

I’m hoping it’s a simple fix probably through me missing something but hopefully someone can give me a shove in the correct direction.


What operating system do you have? What version of PIO do you have? What version of VSCode do you have installed? Can you work with PIO from the command line (basic pio --version and pio init -b unostuff)? What operation do you do that makes the error appear? What’s the full error message?

Ooops…my bad.

  • Windows 10
  • IDE 0.14.1
  • 1.22.2
  • Nope
  • Installing PlatformIO from within VSC

This is a fresh install. Tries again every time I start VSC now.

Hm, all I can say is that I just downloaded that exact VSCode version as a portable ZIP and the installation of the plugin went through without problems.

Can you eloborate on how PIO doesn’t work from the command line? If you installed Python2 (not python3!) + PIP + PlatformIO and added the Python27/Scripts to your PATH, you should be able to call platformio / pio from the shell. Is there an error message when you try to do pio --version from cmd.exe?

  1. Please navigate to System Control Panel > Programs > Uninstall all Pythons
  2. Remove C:\Users\andre\.platformio folder
  3. Install Python 2.7 manually Redirecting...
  4. Start VSCode.

Does it work now?

Thanks Max

Definitely installing Python2 but the instructions on the PlatformIO site don’t mention PIP and say if I’m installing IDE there’s no need to install the core version. I definitely can’t seem to run anything from the command line.

My path (first section) PATH=C:\Python27;C:\Python27\Scripts;C:\Users\andre.platformio\penv\Scripts;

Ivan, pretty much what I’ve been trying a few times today but without step2. So…tried again with step2 and still the same.

Added a PowerShell Extension and that completed OK.

So…just tried installing (as admin) PlatformIO core even though it shouldn’t be necessary according to the website and I get a very similar error.

Well, I tried following the instructions to the letter on another Windows 10 machine and got exactly the same.

I was hoping some time on programming a microcontroller not debugging an IDE extension so thanks for the input so far but I’m jumping ship in favour of something watertight for now.