Fildem-v2
Fildem-v2 copied to clipboard
Use `sys.executable` in `command.run_command` for version-independent execution.
One problem I found recently when trying to use Fildem on my Ubuntu 22.10 install, after installing Python 3.11 from apt
and setting a symlink from python3.11
--> python3
, was that when executing fildem
, Python would raise a ModuleNotFoundError
for fildem
. This would happen even if I reinstalled Fildem explicitly using python3.10
.
Having a look at the source code, I realised that this error most likely occurs due to the command being specified for the secondary Fildem thread in command.run_command
using the python3
executable set in the system's PATH
, which may not match the version of Python 3 used to install Fildem. To fix this, the code now replaces the call to python3
with sys.executable
instead, which provides an absolute path to the Python 3 executable used at runtime.
Testing this on my system, this appears to have fixed the issue.