Useful or not, from you.
platformio-vscode-ide ModuleNotFoundError: No module named 'distutils.***'


Some Linux distributives have a limited Python3 installed by default. Please open your system terminal and type:

sudo apt-get install python3-distutils

Now, restart VSCode. If it does not work, try to install sudo apt-get install python3-venv. Restart VSCode.

%23 Description of problem Leave a comment...



%23 Configuration

VSCode: 1.36.1 PIO IDE: v1.8.0 System: Linux, 5.0.0-20-generic, x64

%23 Exception

Error: Could not create PIO Core Virtual Environment. Please create it manually -> 
 Error: Virtualenv Create: Traceback (most recent call last):
  File "/home/xi/.platformio/.cache/tmp-11633a521cEj3iqkN/virtualenv-16.1.0/src/", line 20, in <module>
    import distutils.spawn
ModuleNotFoundError: No module named 'distutils.spawn'

	at t.value (/home/xi/.vscode/extensions/platformio.platformio-ide-1.8.0/node_modules/platformio-node-helpers/dist/index.js:1:28858)
That's a useful answer
Without any help

Nice... so only distutils should be needed then. I can't see why python3-distutils isn't installed... it seems to stem from the debian repo though - as there is a mention of "With python 3.6, python3-distutils is no longer installed by default." in a bug report... but... um... why? Whilst distutils is being phased out... it hasn't been dropped yet! :man_facepalming: :face_with_head_bandage: