In case anyone get stuck with subprocess.run(..., cwd=
long_name_dir
)
, I have tried more or less everything, and at some point chatgpt told me that apparently the part of Windows that get called here still has a hard 260 limit. It attached a source (which seems irrrelevant to me but I can't be bothered to read it all). Thankfully in my case I could set cwd to any other temporary directory.