facebookresearch / NeRF-Det

[ICCV 2023] Code for NeRF-Det: Learning Geometry-Aware Volumetric Representation for Multi-View 3D Object Detection
https://chenfengxu714.github.io/nerfdet/
Other
279 stars 18 forks source link

Env setup error(mmdet/mmpycocotools) #6

Closed Rorsc4achhh closed 1 year ago

Rorsc4achhh commented 1 year ago

Running in wsl2 ubuntu18.04, cuda101, torch 1.6.0, mmcv-full==1.2.7

ERROR shows when trying to "pip install mmdet==2.10.0"(Don't have this mmpycocotools error when using higher version of mmdet, but seems the mmcv-full>=1.1.5, <=1.3 requirement won't satisfy):

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-cpython-37 creating build/lib.linux-x86_64-cpython-37/pycocotools copying pycocotools/cocoeval.py -> build/lib.linux-x86_64-cpython-37/pycocotools copying pycocotools/coco.py -> build/lib.linux-x86_64-cpython-37/pycocotools copying pycocotools/mask.py -> build/lib.linux-x86_64-cpython-37/pycocotools copying pycocotools/init.py -> build/lib.linux-x86_64-cpython-37/pycocotools running build_ext Compiling pycocotools/_mask.pyx because it changed. [1/1] Cythonizing pycocotools/_mask.pyx /home/zc/miniconda3/envs/open-mmlab/lib/python3.7/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-49xe8099/mmpycocotools_05b8a288530045d6a66fcac080670e25/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-cpython-37 creating build/temp.linux-x86_64-cpython-37/common creating build/temp.linux-x86_64-cpython-37/pycocotools gcc -pthread -B /home/zc/miniconda3/envs/open-mmlab/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/zc/miniconda3/envs/open-mmlab/lib/python3.7/site-packages/numpy/core/include -Icommon -I/home/zc/miniconda3/envs/open-mmlab/include/python3.7m -c ../common/maskApi.c -o build/temp.linux-x86_64-cpython-37/../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: Failed building wheel for mmpycocotools Running setup.py clean for mmpycocotools Failed to build mmpycocotools Installing collected packages: mmpycocotools, mmdet 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/zc/miniconda3/envs/open-mmlab/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. setuptools.SetuptoolsDeprecationWarning, running build running build_py creating build/lib.linux-x86_64-cpython-37 creating build/lib.linux-x86_64-cpython-37/pycocotools copying pycocotools/cocoeval.py -> build/lib.linux-x86_64-cpython-37/pycocotools copying pycocotools/coco.py -> build/lib.linux-x86_64-cpython-37/pycocotools copying pycocotools/mask.py -> build/lib.linux-x86_64-cpython-37/pycocotools copying pycocotools/init.py -> build/lib.linux-x86_64-cpython-37/pycocotools running build_ext building 'pycocotools._mask' extension creating build/temp.linux-x86_64-cpython-37 creating build/temp.linux-x86_64-cpython-37/common creating build/temp.linux-x86_64-cpython-37/pycocotools gcc -pthread -B /home/zc/miniconda3/envs/open-mmlab/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/zc/miniconda3/envs/open-mmlab/lib/python3.7/site-packages/numpy/core/include -Icommon -I/home/zc/miniconda3/envs/open-mmlab/include/python3.7m -c ../common/maskApi.c -o build/temp.linux-x86_64-cpython-37/../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

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

chenfengxu714 commented 1 year ago

Hi, I am not sure whether cuda10.1 can work for open-mmlab related packages, could you install cuda10.2 or higher?

Rorsc4achhh commented 1 year ago

Thanks for your reply, let me give it a shot.

Rorsc4achhh commented 1 year ago

Just tried using cu111,still shows this error "Failed building wheel for mmpycocotools" when trying to pip mmdet 2.10.0. And I just double checked other requirements but they all seems satisfied :(

Rorsc4achhh commented 1 year ago

Switched to mmdet==2.12.0 and it's installed successfully without building wheel for mmpycocotools. Just wondering does mmpycocotools matter? Because I'm generally following the steps in Dockerfile and it asked me to pip this before installing rotated_iou.

yyfz commented 1 year ago

Switched to mmdet==2.12.0 and it's installed successfully without building wheel for mmpycocotools. Just wondering does mmpycocotools matter? Because I'm generally following the steps in Dockerfile and it asked me to pip this before installing rotated_iou.

I follow your solution but get error "MMCV==1.2.7 is used but incompatible. Please install mmcv>=1.3.2, <=1.4.0.". This may because mmdet of 2.12.0 version can't support mmcv of 1.2.7 version. However, mmdet3d of version 0.8.0 support mmcv of version between 1.1.5 and 1.3.0.

So i think it is necessary to install mmdet of version 2.10.0 but we meet the same error on mmpycocotools.

Rorsc4achhh commented 1 year ago

Yeah 2.12.0 seems incompatible. I also tried different version of python and different version of Ubuntu , which still encounter with building mmpycocotools problem :|


发件人: Yifan Wang @.> 发送时间: Monday, August 21, 2023 4:06:44 PM 收件人: facebookresearch/NeRF-Det @.> 抄送: Zhou, Chong @.>; Author @.> 主题: Re: [facebookresearch/NeRF-Det] Env setup error(mmdet/mmpycocotools) (Issue #6)

CAUTION: External Sender

Switched to mmdet==2.12.0 and it's installed successfully without building wheel for mmpycocotools. Just wondering does mmpycocotools matter? Because I'm generally following the steps in Dockerfile and it asked me to pip this before installing rotated_iou.

I follow your solution but get error "MMCV==1.2.7 is used but incompatible. Please install mmcv>=1.3.2, <=1.4.0.". This may because mmdet of 2.12.0 version can't support mmcv of 1.2.7 version. However, mmdet3d of version 0.8.0 support mmcv of version between 1.1.5 and 1.3.0.

So i think it is necessary to install mmdet of version 2.10.0 but we meet the same error on mmpycocotools.

― Reply to this email directly, view it on GitHubhttps://github.com/facebookresearch/NeRF-Det/issues/6#issuecomment-1685850430, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AZPFUC3FX56W6M2BKHM65OLXWMJJJANCNFSM6AAAAAA3XAXTEM. You are receiving this because you authored the thread.Message ID: @.***>

chenfengxu714 commented 1 year ago

Hi, sorry for the late reply, could you try to just go without mmpycocotools? I did not encounter this issue but it seems that this tool is used for nuScenes dataset etc?

Rorsc4achhh commented 1 year ago

pip3 install cython==0.29.33 (https://github.com/open-mmlab/mmdetection/issues/10730) Thanks for your reply, just found the solution here that use specific cython version would do. :)

mrsempress commented 1 year ago

Could you share the complete env for me, please, especially for torch/torchvision/cuda/mmdet/mmcv/mmengine/cython? If so, I would appreciate it.

Rorsc4achhh commented 1 year ago

mmpycocotools==12.0.3 torch==1.8.0 torchvision==0.9.0 mmcv-full==1.2.7 mmdet==2.7.0 cu111, cython version as above.

mrsempress commented 1 year ago

Thanks, I will try it.

rahulswa08 commented 11 months ago

=2.7.0

hi, I have tried this setup but getting this error NCCL version 2.7.8 ncclInvalidUsage: This usually reflects invalid usage of NCCL library (such as too many async ops, too many collectives at once, mixing streams in a group, etc). RuntimeError any idea why is this happening?