I am trying to run the following command:
pip install layoutparser torchvision && pip install “git+https://github.com/facebookresearch/detectron2.git@v0.5#egg=detectron2”
Failure message is:
Allowing ninja to set a default number of workers… (overridable by setting the environment variable MAX_JOBS=N)
ninja: error: Stat(C:/Users/win10/AppData/Local/Temp/pip-install-4zl39kfo/detectron2_fdca3b3eb0be498b97348507fa457fcb/build/temp.win-amd64-cpython-310/Release/Users/win10/AppData/Local/Temp/pip-install-4zl39kfo/detectron2_fdca3b3eb0be498b97348507fa457fcb/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cpu.obj): Filename longer than 260 characters
Traceback (most recent call last):
File “C:\Users\win10\AppData\Roaming\Python\Python310\site-packages\torch\utils\cpp_extension.py”, line 2104, in _run_ninja_build
subprocess.run(
File “C:\Program Files\Python310\lib\subprocess.py”, line 524, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command ‘[‘ninja’, ‘-v’]’ returned non-zero exit status 1.
I have already set flag in windows setup to enable long file name.
Is there work around in this case kindly let me know.
Since this is build stage is there a way to breakdown PIP steps and do manually the build phase or something of that sort, if you know or anyone knows, then kindly revert.
For all facing this kind of problem of installing detectron2 (which was giving filename more than 260 char issue) - may try this which solved problem for me:
I ran this command and my detectron2 got installed and i am able to go further into LayoutParser.
Thanks guys for supporting.
This can be closed now for me at least. Though main issue was not solved (using ninja thru pip installation but my aim was to use layout parser which required this and that is solved.)