Solution
Some Linux distributives have a limited Python3 installed by default. Please install the following package and restart the IDE:
sudo apt-get install python3-venv
If you use a custom Python version, then
sudo apt-get install python3.xx-venv
where python3.xx equals the version of your Python interpreter (check it via python3 --version). For example, python3.10-venv for Python 3.10.
Now, please check your Python installation:
python3 -c "import venv; import ensurepip; print('Congrats! Python `venv` is already installed!')"
Finally, Restart VSCode.
%23 Description of problem
Leave a comment...
BEFORE SUBMITTING, PLEASE SEARCH FOR DUPLICATES IN
%23 Configuration
VSCode: 1.49.0
PIO IDE: v2.0.1
System: Linux, 4.19.0-10-amd64, x64
%23 Exception
Error: Error: Can not install PlatformIO Core due to a missed `distutils` package in your Python installation.
Please install this package manually using the OS package manager. For example:
$ apt-get install python3-distutils
(MAY require administrator access `sudo`)
-> Installer version: 0.3.4
Platform: Linux-4.19.0-10-amd64-x86_64-with-glibc2.28
Python version: 3.7.3 (default, Jul 25 2020, 13:03:44)
[GCC 8.3.0]
Python path: /usr/bin/python3
Creating a virtual environment at /home/yugo/.platformio/penv
at /home/yugo/.vscode/extensions/platformio.platformio-ide-2.0.1/node_modules/platformio-node-helpers/dist/webpack:/platformio-node-helpers/src/proc.js:138:23
at ChildProcess.c (/home/yugo/.vscode/extensions/platformio.platformio-ide-2.0.1/node_modules/platformio-node-helpers/dist/webpack:/platformio-node-helpers/src/proc.js:124:5)
at ChildProcess.emit (events.js:223:5)
at ChildProcess.EventEmitter.emit (domain.js:475:20)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
Solution
Some Linux distributives have a limited Python3 installed by default. Please install the following package and restart the IDE:
If you use a custom Python version, then
where
python3.xxequals the version of your Python interpreter (check it viapython3 --version). For example,python3.10-venvfor Python 3.10.Now, please check your Python installation:
Finally, Restart VSCode.
%23 Description of problem
Leave a comment...
BEFORE SUBMITTING, PLEASE SEARCH FOR DUPLICATES IN
%23 Configuration
VSCode: 1.49.0
PIO IDE: v2.0.1
System: Linux, 4.19.0-10-amd64, x64
%23 Exception