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

cc1: fatal error: ../common/maskApi.c: No such file or directory #670

Open
gotobcn8 opened this issue May 1, 2024 · 1 comment
Open

Comments

@gotobcn8
Copy link

gotobcn8 commented May 1, 2024

I install requirements.txt meets trouble like this:

Building wheels for collected packages: pycocotools
  Building wheel for pycocotools (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for pycocotools (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [24 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-39
      creating build/lib.linux-x86_64-cpython-39/pycocotools
      copying pycocotools/coco.py -> build/lib.linux-x86_64-cpython-39/pycocotools
      copying pycocotools/cocoeval.py -> build/lib.linux-x86_64-cpython-39/pycocotools
      copying pycocotools/__init__.py -> build/lib.linux-x86_64-cpython-39/pycocotools
      copying pycocotools/mask.py -> build/lib.linux-x86_64-cpython-39/pycocotools
      running build_ext
      /tmp/pip-build-env-cycyvo14/overlay/lib/python3.9/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /tmp/pip-install-q26n5rk2/pycocotools_3e33d8e0c2824f10852f47c28f4a43de/pycocotools/_mask.pyx
        tree = Parsing.p_module(s, pxd, full_module_name)
      Compiling pycocotools/_mask.pyx because it changed.
      [1/1] Cythonizing pycocotools/_mask.pyx
      building 'pycocotools._mask' extension
      creating build/common
      creating build/temp.linux-x86_64-cpython-39
      creating build/temp.linux-x86_64-cpython-39/common
      creating build/temp.linux-x86_64-cpython-39/pycocotools
      gcc -pthread -B /home/yangls/anaconda3/envs/creamfl/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/yangls/anaconda3/envs/creamfl/include -I/home/yangls/anaconda3/envs/creamfl/include -fPIC -O2 -isystem /home/yangls/anaconda3/envs/creamfl/include -fPIC -I/tmp/pip-build-env-cycyvo14/overlay/lib/python3.9/site-packages/numpy/core/include -I./common -I/home/yangls/anaconda3/envs/creamfl/include/python3.9 -c ../common/maskApi.c -o build/temp.linux-x86_64-cpython-39/../common/maskApi.o -Wno-cpp -Wno-unused-function -std=c99
      cc1: fatal error: ../common/maskApi.c: No such file or directory
      compilation terminated.
      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: Failed building wheel for pycocotools
Failed to build pycocotools
ERROR: Could not build wheels for pycocotools, which is required to install pyproject.toml-based projects

And I tried any methods from github, but It didn't work, could you help me? Here is my environment
python3.9

Package             Version
------------------- -----------
contourpy           1.2.1
cycler              0.12.1
Cython              0.29.33
fonttools           4.51.0
importlib_resources 6.4.0
Jinja2              3.1.3
kiwisolver          1.4.5
MarkupSafe          2.1.5
matplotlib          3.8.4
numpy               1.26.4
packaging           24.0
pillow              10.3.0
pip                 23.3.1
pycocotools         2.0.7
pyparsing           3.1.2
pyproject           1.3.1
python-dateutil     2.9.0.post0
setuptools          59.6.0
six                 1.16.0
wheel               0.41.2
zipp                3.18.1
@gotobcn8
Copy link
Author

gotobcn8 commented May 2, 2024

I used conda python before.
Today I change to ubuntu self-installed python version(not conda), and successfully install packges.

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

1 participant