Installation troubles on Ubuntu - FileNotFoundError: [Errno 2] No such file or directory: ~./penv/bin/python


Just trying to get going with PlatformIO. Installing Core as I plan to try and use CLion.

I have not managed to get past the installation phase… I have tried running the script as suggested, I have downloaded and tried to run, same error.

My python version is 3.10.6

The error I get is:

Installer version: 1.1.2
Platform: Linux-5.15.0-56-generic-x86_64-with-glibc2.35
Python version: 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]
Python path: /usr/bin/python
Creating a virtual environment at /home/colin/.platformio/penv
Traceback (most recent call last):
  File "/home/colin/./Downloads/", line 68, in <module>
  File "/home/colin/./Downloads/", line 60, in main
  File "/home/colin/./Downloads/", line 46, in bootstrap
  File "/home/colin/Downloads/.piocore-installer-6h7vp7iq/tmpq6taqlff/", line 133, in main
  File "/home/colin/Downloads/.piocore-installer-6h7vp7iq/tmpq6taqlff/", line 1128, in __call__
  File "/home/colin/Downloads/.piocore-installer-6h7vp7iq/tmpq6taqlff/", line 1053, in main
  File "/home/colin/Downloads/.piocore-installer-6h7vp7iq/tmpq6taqlff/", line 1637, in invoke
  File "/home/colin/Downloads/.piocore-installer-6h7vp7iq/tmpq6taqlff/", line 1395, in invoke
  File "/home/colin/Downloads/.piocore-installer-6h7vp7iq/tmpq6taqlff/", line 754, in invoke
  File "/home/colin/Downloads/.piocore-installer-6h7vp7iq/tmpq6taqlff/", line 26, in new_func
  File "/home/colin/Downloads/.piocore-installer-6h7vp7iq/tmpq6taqlff/", line 61, in cli
  File "/home/colin/Downloads/.piocore-installer-6h7vp7iq/tmpq6taqlff/", line 70, in install_platformio_core
  File "/home/colin/Downloads/.piocore-installer-6h7vp7iq/tmpq6taqlff/", line 98, in _install_platformio_core
  File "/home/colin/Downloads/.piocore-installer-6h7vp7iq/tmpq6taqlff/", line 71, in create_core_penv
  File "/home/colin/Downloads/.piocore-installer-6h7vp7iq/tmpq6taqlff/", line 141, in init_state
  File "/usr/lib/python3.10/", line 420, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.10/", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/", line 1845, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/home/colin/.platformio/penv/bin/python'

There is indeed no /home/colin/.platformio/penv/bin/python but there is a /home/colin/.platformio/penv/local/bin/python link.

So not really sure what is going on, I think I followed all the appropriate instructions.

I managed to solve the problem. It turns out the install for the IDE also failed.

After further investigation, it turns out that the python virtual environment package is required which is not mentioned anywhere (I have created a PR on the Pre-Req documentation)…

i.e. sudo apt install python3.10-venv solved the problem.