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

Hi,

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/get-platformio.py", line 68, in <module>
    main()
  File "/home/colin/./Downloads/get-platformio.py", line 60, in main
    bootstrap()
  File "/home/colin/./Downloads/get-platformio.py", line 46, in bootstrap
    pioinstaller.__main__.main()
  File "/home/colin/Downloads/.piocore-installer-6h7vp7iq/tmpq6taqlff/pioinstaller.zip/pioinstaller/__main__.py", line 133, in main
  File "/home/colin/Downloads/.piocore-installer-6h7vp7iq/tmpq6taqlff/pioinstaller.zip/click/core.py", line 1128, in __call__
  File "/home/colin/Downloads/.piocore-installer-6h7vp7iq/tmpq6taqlff/pioinstaller.zip/click/core.py", line 1053, in main
  File "/home/colin/Downloads/.piocore-installer-6h7vp7iq/tmpq6taqlff/pioinstaller.zip/click/core.py", line 1637, in invoke
  File "/home/colin/Downloads/.piocore-installer-6h7vp7iq/tmpq6taqlff/pioinstaller.zip/click/core.py", line 1395, in invoke
  File "/home/colin/Downloads/.piocore-installer-6h7vp7iq/tmpq6taqlff/pioinstaller.zip/click/core.py", line 754, in invoke
  File "/home/colin/Downloads/.piocore-installer-6h7vp7iq/tmpq6taqlff/pioinstaller.zip/click/decorators.py", line 26, in new_func
  File "/home/colin/Downloads/.piocore-installer-6h7vp7iq/tmpq6taqlff/pioinstaller.zip/pioinstaller/__main__.py", line 61, in cli
  File "/home/colin/Downloads/.piocore-installer-6h7vp7iq/tmpq6taqlff/pioinstaller.zip/pioinstaller/core.py", line 70, in install_platformio_core
  File "/home/colin/Downloads/.piocore-installer-6h7vp7iq/tmpq6taqlff/pioinstaller.zip/pioinstaller/core.py", line 98, in _install_platformio_core
  File "/home/colin/Downloads/.piocore-installer-6h7vp7iq/tmpq6taqlff/pioinstaller.zip/pioinstaller/penv.py", line 71, in create_core_penv
  File "/home/colin/Downloads/.piocore-installer-6h7vp7iq/tmpq6taqlff/pioinstaller.zip/pioinstaller/penv.py", line 141, in init_state
  File "/usr/lib/python3.10/subprocess.py", line 420, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", 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.