2

I try to install pycocotools using someone else's miniconda environment: pip install pycocotools

but get the following error message:

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
  ╰─> [21 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-38
      creating build/lib.linux-x86_64-cpython-38/pycocotools
      copying pycocotools/__init__.py -> build/lib.linux-x86_64-cpython-38/pycocotools
      copying pycocotools/coco.py -> build/lib.linux-x86_64-cpython-38/pycocotools
      copying pycocotools/cocoeval.py -> build/lib.linux-x86_64-cpython-38/pycocotools
      copying pycocotools/mask.py -> build/lib.linux-x86_64-cpython-38/pycocotools
      running build_ext
      cythoning pycocotools/_mask.pyx to pycocotools/_mask.c
      building 'pycocotools._mask' extension
      creating build/temp.linux-x86_64-cpython-38
      creating build/temp.linux-x86_64-cpython-38/common
      creating build/temp.linux-x86_64-cpython-38/pycocotools
      /xxx/miniconda3/envs/lidar_env/bin/gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/tmp/pip-build-env-gi3_jjg8/overlay/lib/python3.8/site-packages/numpy/core/include -I./common -I/home/users/wec.shao/miniconda3/include/python3.8 -c ./common/maskApi.c -o build/temp.linux-x86_64-cpython-38/./common/maskApi.o -Wno-cpp -Wno-unused-function -std=c99
      cc1: error: /home/users/wec.shao/miniconda3/include/python3.8: Permission denied
      /tmp/pip-build-env-gi3_jjg8/overlay/lib/python3.8/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-e5qjj8wx/pycocotools_aa9946ee32e3458698e9390e0140eaa6/pycocotools/_mask.pyx
        tree = Parsing.p_module(s, pxd, full_module_name)
      error: command '/xxx/miniconda3/envs/lidar_env/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

I found that in gcc compile options, there exist such option: -I/home/users/wec.shao/miniconda3/include/python3.8

and this directory path can not be readable for me, now I want to modify this path, but I don't know how to modify this include path?

Jayn
  • 45
  • 1
  • 7

0 Answers0