cocodataset / cocoapi

COCO API - Dataset @ http://cocodataset.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

clang: error: no such file or directory: 'pycocotools/_mask.c' when running the makefile

antoinecomp opened this issue · comments

I am trying to install coco locally. Yet it seems some files are missing when running the makefile, it seems it cannot find the pycocotools/_mask.c file. This file appears to be missing or not properly generated.

(venv) remplacement@remplacements-MacBook-Pro PythonAPI % make
python setup.py build_ext --inplace
running build_ext
building 'pycocotools._mask' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -I/Users/remplacement/PycharmProjects/automaticImageCaptioning/venv/lib/python3.8/site-packages/numpy/core/include -I../common -I/Users/remplacement/PycharmProjects/automaticImageCaptioning/venv/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c ../common/maskApi.c -o build/temp.macosx-10.14.6-arm64-cpython-38/../common/maskApi.o -Wno-cpp -Wno-unused-function -std=c99
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -I/Users/remplacement/PycharmProjects/automaticImageCaptioning/venv/lib/python3.8/site-packages/numpy/core/include -I../common -I/Users/remplacement/PycharmProjects/automaticImageCaptioning/venv/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c pycocotools/_mask.c -o build/temp.macosx-10.14.6-arm64-cpython-38/pycocotools/_mask.o -Wno-cpp -Wno-unused-function -std=c99
clang: error: no such file or directory: 'pycocotools/_mask.c'
clang: error: no input files
error: command '/usr/bin/clang' failed with exit code 1
make: *** [all] Error 1

There was no need to rebuild the file as the MakeFile already has python setup.py build_ext --inplace

also here

It might be helpful to try installing pycocotools directly from the GitHub repository, "git+https://github.com/philferriere/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI"

pip install cython did the trick for me