Commands python-add-import, python-remove-imports and python-sort-imports run a short Python script stored in variable python--list-imports; That script starts with: from isort import find_imports_in_stream, find_imports_in_paths But find_imports_in_stream and find_imports_in_paths were introduced in version 5.7.0 of the isort library. Debian bookworm has isort version 5.6.4 in its package repositories. Thus on such system commands python-add-import, python-remove-import and python-sort-imports fail with error message: python exited with status 1 (maybe isort is missing?) This is misleading when the isort library is installed. I suggest to extend the Python script in order to catch the import errors and return status 1 if the isort library is not found and status 2 if the expected symbols aren't found. The error message can then be specialized. This is what I implemented in the attached patch.