But does it also work via python3? If the content of your LittleFSBuild.py is the same from the post above,
Import("env")
env.Replace( MKSPIFFSTOOL='python3" "' + env.get("PROJECT_DIR") + '/mklittlefs.py' )
the script will invoke python3, not python… Though I don’t know why the double quotes are exactly this way, you might have to delete them so that it results in python3 <project_dir>/mklittefs.py (or put the whole path to the script in quotes in case the path contains spaces)