SegmentationBLWX / sssegmentation

SSSegmentation: An Open Source Supervised Semantic Segmentation Toolbox Based on PyTorch.
https://sssegmentation.readthedocs.io/en/latest/
Apache License 2.0
774 stars 107 forks source link

ERROR: Could not build wheels for chainercv, which is required to install pyproject.toml-based projects #44

Closed umarjibrilmohd closed 8 months ago

umarjibrilmohd commented 8 months ago

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for chainercv Running setup.py clean for chainercv Building wheel for chainer (setup.py) ... done Created wheel for chainer: filename=chainer-7.8.1-py3-none-any.whl size=967716 sha256=8c04b26d59f9c9a7948bdaddf433a834e23959b9a1cc52bfc118919187807a64 Stored in directory: /home/mohammed/.cache/pip/wheels/c5/01/d5/3ef194fa83dbf1d97bab826ca2bf235071f412861189a7b9df Building wheel for iopath (setup.py) ... done Created wheel for iopath: filename=iopath-0.1.10-py3-none-any.whl size=31530 sha256=6bf140ecbf8c873308103a7c8ebd313cb75226c9d5673e94ac6333a0b1604b88 Stored in directory: /home/mohammed/.cache/pip/wheels/89/3e/24/0f349c0b2eeb6965903035f3b00dbb5c9bea437b4a2f18d82c Building wheel for typing (setup.py) ... done Created wheel for typing: filename=typing-3.7.4.3-py3-none-any.whl size=26305 sha256=3b4c4b6304afadcb8fc95d74ae6dd87c9bcd4b92f4c42dcdf90faad9a077f294 Stored in directory: /home/mohammed/.cache/pip/wheels/5e/5d/01/3083e091b57809dad979ea543def62d9d878950e3e74f0c930 Successfully built fvcore chainer iopath typing Failed to build chainercv ERROR: Could not build wheels for chainercv, which is required to install pyproject.toml-based projects

umarjibrilmohd commented 8 months ago

i tried both 3.7 and 3.9 but giving same error

CharlesPikachu commented 8 months ago

maybe you can first try python3 -m pip install --upgrade pip setuptools wheel and then install chainercv.

umarjibrilmohd commented 8 months ago

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for chainercv Running setup.py clean for chainercv Failed to build chainercv

umarjibrilmohd commented 8 months ago

your suggestion didt work, i even try it before i reported here.

CharlesPikachu commented 8 months ago

this error is sourced from chainercv, maybe I can set chainercv as an optional dependency in the next update.

CharlesPikachu commented 8 months ago

Hi, now, you can remove chainercv in requirements/evaluate.txt to install SSSegmentation if it is still a problem for you to install chainercv. SSSegmentation will auto call other APIs to evaluate model performance.

BTW, could you provide your detailed environment info? I try to install chainercv using different python version and all installed successfully.

umarjibrilmohd commented 8 months ago

I’m on a remote server and I tried python 3.7 and 3.9, I upgraded the PyTorch and I used 2 different servers but all showing same. Now will try to remove the chainercv

umarjibrilmohd commented 8 months ago

I really want to test your repo, because of how you organized it.

CharlesPikachu commented 8 months ago

maybe you can seek helps from chainercv official repo.

anyway, you can first try to remove chainercv in requirements to run SSSegmentation now

umarjibrilmohd commented 8 months ago

i deleted and left with only these (cityscapesscripts pycocotools) in the evaluate.txt.

but the error remains, so surprising.

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

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [21 lines of output] /tmp/pip-install-72a9n0b4/chainercv_20beff69486448a0a1735a0b16fcc7e3/setup.py:12: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html import pkg_resources /opt/anaconda3/envs/fpr/lib/python3.8/site-packages/setuptools/_core_metadata.py:157: SetuptoolsDeprecationWarning: Invalid config. !!

          ********************************************************************************
          newlines are not allowed in `summary` and will break in the future
          ********************************************************************************

  !!
    write_field('Summary', single_line(summary))
  warning: no previously-included files matching '*.pyx' found under directory 'chainercv'
  In file included from /usr/lib/gcc/x86_64-linux-gnu/7/include/syslimits.h:7:0,
                   from /usr/lib/gcc/x86_64-linux-gnu/7/include/limits.h:34,
                   from /opt/anaconda3/envs/fpr/include/python3.8/Python.h:11,
                   from chainercv/utils/bbox/_nms_gpu_post.c:17:
  /usr/lib/gcc/x86_64-linux-gnu/7/include/limits.h:194:15: fatal error: limits.h: No such file or directory
   #include_next <limits.h>  /* recurse down to the real one */
                 ^~~~~~~~~~
  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 chainercv Running setup.py clean for chainercv Failed to build chainercv ERROR: Could not build wheels for chainercv, which is required to install pyproject.toml-based projects (base) mohammed@c24032:~/sssegmentation/sssegmentation$

CharlesPikachu commented 8 months ago

https://stackoverflow.com/questions/30624829/no-such-file-or-directory-limits-h-when-installing-pillow-on-alpine-linux

umarjibrilmohd commented 8 months ago

now i removed the chainercv from the evalution after cloning the repo again, and it work.

umarjibrilmohd commented 8 months ago

for your information, the chainercv is still not an optional, the program cant run without it. so i must have an alternative to install it before the training. thank you.

bestpaper commented 8 months ago

maybe you can provide the detailed error msgs during training

umarjibrilmohd commented 8 months ago

the below message is the error

File "/home/mohammed/PycharmProjects/pythonProject4/sssegmentation/ssseg/modules/datasets/builder.py", line 8, in from .lip import LIPDataset File "/home/mohammed/PycharmProjects/pythonProject4/sssegmentation/ssseg/modules/datasets/lip.py", line 9, in from .base import BaseDataset File "/home/mohammed/PycharmProjects/pythonProject4/sssegmentation/ssseg/modules/datasets/base.py", line 14, in from chainercv.evaluations import eval_semantic_segmentation ModuleNotFoundError: No module named 'chainercv' Traceback (most recent call last): File "ssseg/train.py", line 17, in from modules import ( File "/home/mohammed/PycharmProjects/pythonProject4/sssegmentation/ssseg/modules/init.py", line 2, in from .datasets import ( File "/home/mohammed/PycharmProjects/pythonProject4/sssegmentation/ssseg/modules/datasets/init.py", line 2, in from .builder import DatasetBuilder, BuildDataset File "/home/mohammed/PycharmProjects/pythonProject4/sssegmentation/ssseg/modules/datasets/builder.py", line 8, in from .lip import LIPDataset File "/home/mohammed/PycharmProjects/pythonProject4/sssegmentation/ssseg/modules/datasets/lip.py", line 9, in from .base import BaseDataset File "/home/mohammed/PycharmProjects/pythonProject4/sssegmentation/ssseg/modules/datasets/base.py", line 14, in from chainercv.evaluations import eval_semantic_segmentation ModuleNotFoundError: No module named 'chainercv' Killing subprocess 280936 Killing subprocess 280937 Killing subprocess 280938 Killing subprocess 280939 Traceback (most recent call last): File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/mohammed/PycharmProjects/pythonProject4/sssegmentation/myenv/lib/python3.8/site-packages/torch/distributed/launch.py", line 340, in main() File "/home/mohammed/PycharmProjects/pythonProject4/sssegmentation/myenv/lib/python3.8/site-packages/torch/distributed/launch.py", line 326, in main sigkill_handler(signal.SIGTERM, None) # not coming back File "/home/mohammed/PycharmProjects/pythonProject4/sssegmentation/myenv/lib/python3.8/site-packages/torch/distributed/launch.py", line 301, in sigkill_handler raise subprocess.CalledProcessError(returncode=last_return_code, cmd=cmd) subprocess.CalledProcessError: Command '['/home/mohammed/PycharmProjects/pythonProject4/sssegmentation/myenv/bin/python', '-u', 'ssseg/train.py', '--local_rank=3', '--nproc_per_node', '4', '--cfgfilepath', 'ssseg/configs/annnet/annnet_resnet50os16_ade20k.py']' returned non-zero exit status 1.

CharlesPikachu commented 8 months ago

it is clear that you fail to clone the latest codes. please clone from this repo again.

umarjibrilmohd commented 8 months ago

i install the new one and the issue has gone