PJLab-ADG / LoGoNet

[CVPR2023] LoGoNet: Towards Accurate 3D Object Detection with Local-to-Global Cross-Modal Fusion
248 stars 17 forks source link

配置mmpycocotools环境出错 #24

Closed Z-Lee-corder closed 1 year ago

Z-Lee-corder commented 1 year ago

按照要求配置image modules中的环境,可是在pip install mmpycocotools 时总是报以下错:

(open-mmlab) lizheng@lizheng-MS-7A59:/media/lizheng/Samsung/codes/LoGoNet/detection/al3d_det/models/image_modules/swin_model$ pip install mmpycocotools Collecting mmpycocotools Using cached mmpycocotools-12.0.3.tar.gz (23 kB) Preparing metadata (setup.py) ... done Requirement already satisfied: setuptools>=18.0 in /home/lizheng/anaconda3/envs/open-mmlab/lib/python3.8/site-packages (from mmpycocotools) (61.2.0) Requirement already satisfied: cython>=0.27.3 in /home/lizheng/anaconda3/envs/open-mmlab/lib/python3.8/site-packages (from mmpycocotools) (3.0.0) Requirement already satisfied: matplotlib>=2.1.0 in /home/lizheng/anaconda3/envs/open-mmlab/lib/python3.8/site-packages (from mmpycocotools) (3.5.2) Requirement already satisfied: kiwisolver>=1.0.1 in /home/lizheng/anaconda3/envs/open-mmlab/lib/python3.8/site-packages (from matplotlib>=2.1.0->mmpycocotools) (1.4.3) Requirement already satisfied: numpy>=1.17 in /home/lizheng/anaconda3/envs/open-mmlab/lib/python3.8/site-packages (from matplotlib>=2.1.0->mmpycocotools) (1.22.4) Requirement already satisfied: pyparsing>=2.2.1 in /home/lizheng/anaconda3/envs/open-mmlab/lib/python3.8/site-packages (from matplotlib>=2.1.0->mmpycocotools) (3.0.9) Requirement already satisfied: python-dateutil>=2.7 in /home/lizheng/anaconda3/envs/open-mmlab/lib/python3.8/site-packages (from matplotlib>=2.1.0->mmpycocotools) (2.8.2) Requirement already satisfied: packaging>=20.0 in /home/lizheng/anaconda3/envs/open-mmlab/lib/python3.8/site-packages (from matplotlib>=2.1.0->mmpycocotools) (21.3) Requirement already satisfied: cycler>=0.10 in /home/lizheng/anaconda3/envs/open-mmlab/lib/python3.8/site-packages (from matplotlib>=2.1.0->mmpycocotools) (0.11.0) Requirement already satisfied: pillow>=6.2.0 in /home/lizheng/anaconda3/envs/open-mmlab/lib/python3.8/site-packages (from matplotlib>=2.1.0->mmpycocotools) (9.1.1) Requirement already satisfied: fonttools>=4.22.0 in /home/lizheng/anaconda3/envs/open-mmlab/lib/python3.8/site-packages (from matplotlib>=2.1.0->mmpycocotools) (4.33.3) Requirement already satisfied: six>=1.5 in /home/lizheng/.local/lib/python3.8/site-packages (from python-dateutil>=2.7->matplotlib>=2.1.0->mmpycocotools) (1.15.0) Building wheels for collected packages: mmpycocotools Building wheel for mmpycocotools (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [23 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.8 creating build/lib.linux-x86_64-3.8/pycocotools copying pycocotools/cocoeval.py -> build/lib.linux-x86_64-3.8/pycocotools copying pycocotools/mask.py -> build/lib.linux-x86_64-3.8/pycocotools copying pycocotools/coco.py -> build/lib.linux-x86_64-3.8/pycocotools copying pycocotools/init.py -> build/lib.linux-x86_64-3.8/pycocotools running build_ext Compiling pycocotools/_mask.pyx because it changed. [1/1] Cythonizing pycocotools/_mask.pyx /home/lizheng/anaconda3/envs/open-mmlab/lib/python3.8/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-4w3usf7w/mmpycocotools_f828a534b0364f73bea4e3bd394507f9/pycocotools/_mask.pyx tree = Parsing.p_module(s, pxd, full_module_name) building 'pycocotools._mask' extension creating build/common creating build/temp.linux-x86_64-3.8 creating build/temp.linux-x86_64-3.8/common creating build/temp.linux-x86_64-3.8/pycocotools gcc -pthread -B /home/lizheng/anaconda3/envs/open-mmlab/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/lizheng/anaconda3/envs/open-mmlab/lib/python3.8/site-packages/numpy/core/include -Icommon -I/home/lizheng/anaconda3/envs/open-mmlab/include/python3.8 -c ../common/maskApi.c -o build/temp.linux-x86_64-3.8/../common/maskApi.o gcc: error: ../common/maskApi.c: 没有那个文件或目录 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 mmpycocotools Running setup.py clean for mmpycocotools Failed to build mmpycocotools Installing collected packages: mmpycocotools Running setup.py install for mmpycocotools ... error error: subprocess-exited-with-error

× Running setup.py install for mmpycocotools did not run successfully. │ exit code: 1 ╰─> [19 lines of output] running install /home/lizheng/anaconda3/envs/open-mmlab/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 creating build/lib.linux-x86_64-3.8 creating build/lib.linux-x86_64-3.8/pycocotools copying pycocotools/cocoeval.py -> build/lib.linux-x86_64-3.8/pycocotools copying pycocotools/mask.py -> build/lib.linux-x86_64-3.8/pycocotools copying pycocotools/coco.py -> build/lib.linux-x86_64-3.8/pycocotools copying pycocotools/init.py -> build/lib.linux-x86_64-3.8/pycocotools running build_ext building 'pycocotools._mask' extension creating build/temp.linux-x86_64-3.8 creating build/temp.linux-x86_64-3.8/common creating build/temp.linux-x86_64-3.8/pycocotools gcc -pthread -B /home/lizheng/anaconda3/envs/open-mmlab/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/lizheng/anaconda3/envs/open-mmlab/lib/python3.8/site-packages/numpy/core/include -Icommon -I/home/lizheng/anaconda3/envs/open-mmlab/include/python3.8 -c ../common/maskApi.c -o build/temp.linux-x86_64-3.8/../common/maskApi.o gcc: error: ../common/maskApi.c: 没有那个文件或目录 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

note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

kenfishball commented 1 year ago

try to use pip install cython, and check your cython version

Z-Lee-corder commented 1 year ago

try to use pip install cython, and check your cython version

My cython is 3.0.0, and pycocotools is 2.0.6. When I run "pip install mmpycocotools", the following error occurs:

Building wheels for collected packages: mmpycocotools Building wheel for mmpycocotools (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [23 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.8 creating build/lib.linux-x86_64-3.8/pycocotools copying pycocotools/cocoeval.py -> build/lib.linux-x86_64-3.8/pycocotools copying pycocotools/mask.py -> build/lib.linux-x86_64-3.8/pycocotools copying pycocotools/coco.py -> build/lib.linux-x86_64-3.8/pycocotools copying pycocotools/init.py -> build/lib.linux-x86_64-3.8/pycocotools running build_ext Compiling pycocotools/_mask.pyx because it changed. [1/1] Cythonizing pycocotools/_mask.pyx /home/lizheng/anaconda3/envs/open-mmlab/lib/python3.8/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-p_sd6bt8/mmpycocotools_12b2f045788744d89a646ff91138baea/pycocotools/_mask.pyx tree = Parsing.p_module(s, pxd, full_module_name) building 'pycocotools._mask' extension creating build/common creating build/temp.linux-x86_64-3.8 creating build/temp.linux-x86_64-3.8/common creating build/temp.linux-x86_64-3.8/pycocotools gcc -pthread -B /home/lizheng/anaconda3/envs/open-mmlab/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/lizheng/anaconda3/envs/open-mmlab/lib/python3.8/site-packages/numpy/core/include -Icommon -I/home/lizheng/anaconda3/envs/open-mmlab/include/python3.8 -c ../common/maskApi.c -o build/temp.linux-x86_64-3.8/../common/maskApi.o gcc: error: ../common/maskApi.c: 没有那个文件或目录 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 mmpycocotools Running setup.py clean for mmpycocotools Failed to build mmpycocotools ERROR: Could not build wheels for mmpycocotools, which is required to install pyproject.toml-based projects

sankin97 commented 1 year ago

I haven't encountered these issues. I hope this suggestion can be helpful to you.

Orbis36 commented 1 year ago

Same issues, everything tried to fix the bug but no use. I follow every step in your instruction. Your codes are tough to install.