I am writing tool that use subprocess.call
and subprocess.Popen
, but faced with an issue on Windows 10 that when env["PATH"]
variable exceed size 8191~8192 characters subprocess
cannot find program located in env["PATH"]
:
`cmake` is not recognized as an internal or external command,
operable program or batch file.
Looks like CreateProcess
on Windows that is used underhood do not parse such long env["PATH"]
I have found lots of similar issues on internet and looks like it is restriction on Windows with maximum command line length, but unfortunately I have not found how to fix it ...
Have somebody faced with the similar issue ?
Is there a way to modify registry to increase this max length ?
Or do you know about some kind of workaround to fix it on Windows except of removing some paths from env["PATH"]
?