Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gcc: error: ../common/maskApi.c: No such file or directory #30

Open
TerryBryant opened this issue Sep 26, 2023 · 3 comments
Open

gcc: error: ../common/maskApi.c: No such file or directory #30

TerryBryant opened this issue Sep 26, 2023 · 3 comments

Comments

@TerryBryant
Copy link

When running:pip install "git+https://github.com/open-mmlab/cocoapi.git#subdirectory=pycocotools"

I get "Running setup.py install for mmpycocotools did not run successfully.
│ exit code: 1
╰─> [10 lines of output]
running install
/opt/conda/envs/openmmlab/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
running build_ext
building 'pycocotools._mask' extension
gcc -pthread -B /opt/conda/envs/openmmlab/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/opt/conda/envs/openmmlab/lib/python3.8/site-packages/numpy/core/include -Icommon -I/opt/conda/envs/openmmlab/include/python3.8 -c ../common/maskApi.c -o build/temp.linux-x86_64-cpython-38/../common/maskApi.o
gcc: error: ../common/maskApi.c: No such file or directory
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> mmpycocotools
"

Please help, thanks in advance.

@Another-0
Copy link

It could be a version issue with the Cython library. Try using a lower version: pip install cython==0.29.36

@hungtrieu07
Copy link

It could be a version issue with the Cython library. Try using a lower version: pip install cython==0.29.36

This solved my problem when install mmdetection 2.1.0

@hubutui
Copy link

hubutui commented Mar 14, 2024

If you would like to use cython >= 3, delete these two lines,

# distutils: language = c
# distutils: sources = ../common/maskApi.c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants