showlab / VLog

Transform Video as a Document with ChatGPT, CLIP, BLIP2, GRIT, Whisper, LangChain.
MIT License
544 stars 26 forks source link

Building wheel for pycocotools (pyproject.toml) did not run successfully. #1

Closed ebibibi closed 1 year ago

ebibibi commented 1 year ago

after run "pip install -r requirements.txt". I got error below on WSL2(Ubuntu).

================================== 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 ╰─> [20 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/coco.py -> build/lib.linux-x86_64-cpython-38/pycocotools copying pycocotools/mask.py -> build/lib.linux-x86_64-cpython-38/pycocotools copying pycocotools/init.py -> build/lib.linux-x86_64-cpython-38/pycocotools copying pycocotools/cocoeval.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 gcc -pthread -B /home/ebi/miniconda3/envs/vlog/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/tmp/pip-build-env-gntaldff/overlay/lib/python3.8/site-packages/numpy/core/include -I./common -I/home/ebi/miniconda3/envs/vlog/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 /tmp/pip-build-env-gntaldff/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-3shislkl/pycocotools_f047b9b62ef641f3831d45f50f738061/pycocotools/_mask.pyx tree = Parsing.p_module(s, pxd, full_module_name) error: command 'gcc' failed: No such file or directory [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pycocotools Successfully built segment-anything Failed to build pycocotools ERROR: Could not build wheels for pycocotools, which is required to install pyproject.toml-based projects

QinghongLin commented 1 year ago

Hi @ebibibi ,

I am not sure but it seems like you are missing the GCC compiler, which is required to build the pycocotools package. To resolve this issue, you need to install the necessary build tools and libraries.

In your WSL2 Ubuntu terminal, try to run the following command to install the required packages:

sudo apt-get update && sudo apt-get install -y build-essential python3-dev

After you've successfully installed the required packages, try installing the dependencies again.