Media-Smart / vedadet

A single stage object detection toolbox based on PyTorch
Apache License 2.0
498 stars 128 forks source link

can't install mmpycocotools in docker #99

Open manadopeee opened 1 year ago

manadopeee commented 1 year ago

Using pip 23.2 from /opt/conda/lib/python3.10/site-packages/pip (python 3.10) Obtaining file:///workspace/vedadet Running command python setup.py egg_info running egg_info creating /tmp/pip-pip-egg-info-9jvrglo0/vedadet.egg-info writing /tmp/pip-pip-egg-info-9jvrglo0/vedadet.egg-info/PKG-INFO writing dependency_links to /tmp/pip-pip-egg-info-9jvrglo0/vedadet.egg-info/dependency_links.txt writing requirements to /tmp/pip-pip-egg-info-9jvrglo0/vedadet.egg-info/requires.txt writing top-level names to /tmp/pip-pip-egg-info-9jvrglo0/vedadet.egg-info/top_level.txt writing manifest file '/tmp/pip-pip-egg-info-9jvrglo0/vedadet.egg-info/SOURCES.txt' /opt/conda/lib/python3.10/site-packages/torch/utils/cpp_extension.py:476: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend. warnings.warn(msg.format('we could not find ninja.')) reading manifest file '/tmp/pip-pip-egg-info-9jvrglo0/vedadet.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file '/tmp/pip-pip-egg-info-9jvrglo0/vedadet.egg-info/SOURCES.txt' Preparing metadata (setup.py) ... done Requirement already satisfied: addict in /opt/conda/lib/python3.10/site-packages (from vedadet==0.1.0) (2.4.0) Requirement already satisfied: terminaltables in /opt/conda/lib/python3.10/site-packages (from vedadet==0.1.0) (3.1.10) Requirement already satisfied: opencv-python in /opt/conda/lib/python3.10/site-packages (from vedadet==0.1.0) (4.8.0.74) Requirement already satisfied: torchvision>=0.7.0 in /opt/conda/lib/python3.10/site-packages (from vedadet==0.1.0) (0.15.2) Requirement already satisfied: pyyaml in /opt/conda/lib/python3.10/site-packages (from vedadet==0.1.0) (6.0) Requirement already satisfied: yapf in /opt/conda/lib/python3.10/site-packages (from vedadet==0.1.0) (0.40.1) Collecting imagecorruptions (from vedadet==0.1.0) Using cached imagecorruptions-1.1.2-py3-none-any.whl (2.1 MB) Collecting mmpycocotools (from vedadet==0.1.0) Using cached mmpycocotools-12.0.3.tar.gz (23 kB) Running command python setup.py egg_info running egg_info creating /tmp/pip-pip-egg-info-wx1jq551/mmpycocotools.egg-info writing /tmp/pip-pip-egg-info-wx1jq551/mmpycocotools.egg-info/PKG-INFO writing dependency_links to /tmp/pip-pip-egg-info-wx1jq551/mmpycocotools.egg-info/dependency_links.txt writing requirements to /tmp/pip-pip-egg-info-wx1jq551/mmpycocotools.egg-info/requires.txt writing top-level names to /tmp/pip-pip-egg-info-wx1jq551/mmpycocotools.egg-info/top_level.txt writing manifest file '/tmp/pip-pip-egg-info-wx1jq551/mmpycocotools.egg-info/SOURCES.txt' reading manifest file '/tmp/pip-pip-egg-info-wx1jq551/mmpycocotools.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file '/tmp/pip-pip-egg-info-wx1jq551/mmpycocotools.egg-info/SOURCES.txt' Preparing metadata (setup.py) ... done Requirement already satisfied: numpy in /opt/conda/lib/python3.10/site-packages (from torchvision>=0.7.0->vedadet==0.1.0) (1.24.3) Requirement already satisfied: requests in /opt/conda/lib/python3.10/site-packages (from torchvision>=0.7.0->vedadet==0.1.0) (2.29.0) Requirement already satisfied: torch in /opt/conda/lib/python3.10/site-packages (from torchvision>=0.7.0->vedadet==0.1.0) (2.0.1) Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in /opt/conda/lib/python3.10/site-packages (from torchvision>=0.7.0->vedadet==0.1.0) (9.4.0) Requirement already satisfied: scikit-image>=0.15 in /opt/conda/lib/python3.10/site-packages (from imagecorruptions->vedadet==0.1.0) (0.21.0) Requirement already satisfied: scipy>=1.2.1 in /opt/conda/lib/python3.10/site-packages (from imagecorruptions->vedadet==0.1.0) (1.11.1) Requirement already satisfied: setuptools>=18.0 in /opt/conda/lib/python3.10/site-packages (from mmpycocotools->vedadet==0.1.0) (65.6.3) Requirement already satisfied: cython>=0.27.3 in /opt/conda/lib/python3.10/site-packages (from mmpycocotools->vedadet==0.1.0) (3.0.0) Requirement already satisfied: matplotlib>=2.1.0 in /opt/conda/lib/python3.10/site-packages (from mmpycocotools->vedadet==0.1.0) (3.7.2) Requirement already satisfied: importlib-metadata>=6.6.0 in /opt/conda/lib/python3.10/site-packages (from yapf->vedadet==0.1.0) (6.8.0) Requirement already satisfied: platformdirs>=3.5.1 in /opt/conda/lib/python3.10/site-packages (from yapf->vedadet==0.1.0) (3.9.1) Requirement already satisfied: tomli>=2.0.1 in /opt/conda/lib/python3.10/site-packages (from yapf->vedadet==0.1.0) (2.0.1) Requirement already satisfied: zipp>=0.5 in /opt/conda/lib/python3.10/site-packages (from importlib-metadata>=6.6.0->yapf->vedadet==0.1.0) (3.16.2) Requirement already satisfied: contourpy>=1.0.1 in /opt/conda/lib/python3.10/site-packages (from matplotlib>=2.1.0->mmpycocotools->vedadet==0.1.0) (1.1.0) Requirement already satisfied: cycler>=0.10 in /opt/conda/lib/python3.10/site-packages (from matplotlib>=2.1.0->mmpycocotools->vedadet==0.1.0) (0.11.0) Requirement already satisfied: fonttools>=4.22.0 in /opt/conda/lib/python3.10/site-packages (from matplotlib>=2.1.0->mmpycocotools->vedadet==0.1.0) (4.41.0) Requirement already satisfied: kiwisolver>=1.0.1 in /opt/conda/lib/python3.10/site-packages (from matplotlib>=2.1.0->mmpycocotools->vedadet==0.1.0) (1.4.4) Requirement already satisfied: packaging>=20.0 in /opt/conda/lib/python3.10/site-packages (from matplotlib>=2.1.0->mmpycocotools->vedadet==0.1.0) (23.0) Requirement already satisfied: pyparsing<3.1,>=2.3.1 in /opt/conda/lib/python3.10/site-packages (from matplotlib>=2.1.0->mmpycocotools->vedadet==0.1.0) (3.0.9) Requirement already satisfied: python-dateutil>=2.7 in /opt/conda/lib/python3.10/site-packages (from matplotlib>=2.1.0->mmpycocotools->vedadet==0.1.0) (2.8.2) Requirement already satisfied: networkx>=2.8 in /opt/conda/lib/python3.10/site-packages (from scikit-image>=0.15->imagecorruptions->vedadet==0.1.0) (2.8.4) Requirement already satisfied: imageio>=2.27 in /opt/conda/lib/python3.10/site-packages (from scikit-image>=0.15->imagecorruptions->vedadet==0.1.0) (2.31.1) Requirement already satisfied: tifffile>=2022.8.12 in /opt/conda/lib/python3.10/site-packages (from scikit-image>=0.15->imagecorruptions->vedadet==0.1.0) (2023.7.10) Requirement already satisfied: PyWavelets>=1.1.1 in /opt/conda/lib/python3.10/site-packages (from scikit-image>=0.15->imagecorruptions->vedadet==0.1.0) (1.4.1) Requirement already satisfied: lazy_loader>=0.2 in /opt/conda/lib/python3.10/site-packages (from scikit-image>=0.15->imagecorruptions->vedadet==0.1.0) (0.3) Requirement already satisfied: charset-normalizer<4,>=2 in /opt/conda/lib/python3.10/site-packages (from requests->torchvision>=0.7.0->vedadet==0.1.0) (2.0.4) Requirement already satisfied: idna<4,>=2.5 in /opt/conda/lib/python3.10/site-packages (from requests->torchvision>=0.7.0->vedadet==0.1.0) (3.4) Requirement already satisfied: urllib3<1.27,>=1.21.1 in /opt/conda/lib/python3.10/site-packages (from requests->torchvision>=0.7.0->vedadet==0.1.0) (1.26.15) Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/lib/python3.10/site-packages (from requests->torchvision>=0.7.0->vedadet==0.1.0) (2023.5.7) Requirement already satisfied: filelock in /opt/conda/lib/python3.10/site-packages (from torch->torchvision>=0.7.0->vedadet==0.1.0) (3.9.0) Requirement already satisfied: typing-extensions in /opt/conda/lib/python3.10/site-packages (from torch->torchvision>=0.7.0->vedadet==0.1.0) (4.5.0) Requirement already satisfied: sympy in /opt/conda/lib/python3.10/site-packages (from torch->torchvision>=0.7.0->vedadet==0.1.0) (1.11.1) Requirement already satisfied: jinja2 in /opt/conda/lib/python3.10/site-packages (from torch->torchvision>=0.7.0->vedadet==0.1.0) (3.1.2) Requirement already satisfied: six>=1.5 in /opt/conda/lib/python3.10/site-packages (from python-dateutil>=2.7->matplotlib>=2.1.0->mmpycocotools->vedadet==0.1.0) (1.16.0) Requirement already satisfied: MarkupSafe>=2.0 in /opt/conda/lib/python3.10/site-packages (from jinja2->torch->torchvision>=0.7.0->vedadet==0.1.0) (2.1.1) Requirement already satisfied: mpmath>=0.19 in /opt/conda/lib/python3.10/site-packages (from sympy->torch->torchvision>=0.7.0->vedadet==0.1.0) (1.3.0) Building wheels for collected packages: mmpycocotools Running command python setup.py bdist_wheel running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-cpython-310 creating build/lib.linux-x86_64-cpython-310/pycocotools copying pycocotools/init.py -> build/lib.linux-x86_64-cpython-310/pycocotools copying pycocotools/cocoeval.py -> build/lib.linux-x86_64-cpython-310/pycocotools copying pycocotools/coco.py -> build/lib.linux-x86_64-cpython-310/pycocotools copying pycocotools/mask.py -> build/lib.linux-x86_64-cpython-310/pycocotools running build_ext Compiling pycocotools/_mask.pyx because it changed. [1/1] Cythonizing pycocotools/_mask.pyx /opt/conda/lib/python3.10/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-4r6a8791/mmpycocotools_bcbe41cf4f3240a6961d3683088cc8ae/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-310 creating build/temp.linux-x86_64-cpython-310/common creating build/temp.linux-x86_64-cpython-310/pycocotools gcc -pthread -B /opt/conda/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/conda/include -fPIC -O2 -isystem /opt/conda/include -fPIC -I/opt/conda/lib/python3.10/site-packages/numpy/core/include -Icommon -I/opt/conda/include/python3.10 -c ../common/maskApi.c -o build/temp.linux-x86_64-cpython-310/../common/maskApi.o gcc: error: ../common/maskApi.c: No such file or directory gcc: fatal error: no input files compilation terminated. error: command '/usr/bin/gcc' failed with exit code 1 error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip. full command: /opt/conda/bin/python -u -c ' exec(compile('"'"''"'"''"'"'

This is -- a caller that pip uses to run setup.py

#

- It imports setuptools before invoking setup.py, to enable projects that directly

import from distutils.core to work with newer packaging standards.

- It provides a clear error message when setuptools is not installed.

- It sets sys.argv[0] to the underlying setup.py, when invoking setup.py so

setuptools doesn'"'"'t think the script is -c. This avoids the following warning:

manifest_maker: standard file '"'"'-c'"'"' not found".

- It generates a shim setup.py, for handling setup.cfg-only projects.

import os, sys, tokenize

try: import setuptools except ImportError as error: print( "ERROR: Can not execute setup.py since setuptools is not available in " "the build environment.", file=sys.stderr, ) sys.exit(1)

file = %r sys.argv[0] = file

if os.path.exists(file): filename = file with tokenize.open(file) as f: setup_py_code = f.read() else: filename = "" setup_py_code = "from setuptools import setup; setup()"

exec(compile(setup_py_code, filename, "exec")) '"'"''"'"''"'"' % ('"'"'/tmp/pip-install-4r6a8791/mmpycocotools_bcbe41cf4f3240a6961d3683088cc8ae/setup.py'"'"',), "", "exec"))' bdist_wheel -d /tmp/pip-wheel-y9zxieil cwd: /tmp/pip-install-4r6a8791/mmpycocotools_bcbe41cf4f3240a6961d3683088cc8ae/ Building wheel for mmpycocotools (setup.py) ... error ERROR: Failed building wheel for mmpycocotools Running setup.py clean for mmpycocotools Running command python setup.py clean running clean removing 'build/temp.linux-x86_64-cpython-310' (and everything under it) removing 'build/lib.linux-x86_64-cpython-310' (and everything under it) 'build/bdist.linux-x86_64' does not exist -- can't clean it 'build/scripts-3.10' does not exist -- can't clean it Failed to build mmpycocotools ERROR: Could not build wheels for mmpycocotools, which is required to install pyproject.toml-based projects root@sunhee-B760M-Pro-RS:/workspace/vedadet# 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 /opt/conda/lib/python3.10/site-packages (from mmpycocotools) (65.6.3) Requirement already satisfied: cython>=0.27.3 in /opt/conda/lib/python3.10/site-packages (from mmpycocotools) (3.0.0) Requirement already satisfied: matplotlib>=2.1.0 in /opt/conda/lib/python3.10/site-packages (from mmpycocotools) (3.7.2) Requirement already satisfied: contourpy>=1.0.1 in /opt/conda/lib/python3.10/site-packages (from matplotlib>=2.1.0->mmpycocotools) (1.1.0) Requirement already satisfied: cycler>=0.10 in /opt/conda/lib/python3.10/site-packages (from matplotlib>=2.1.0->mmpycocotools) (0.11.0) Requirement already satisfied: fonttools>=4.22.0 in /opt/conda/lib/python3.10/site-packages (from matplotlib>=2.1.0->mmpycocotools) (4.41.0) Requirement already satisfied: kiwisolver>=1.0.1 in /opt/conda/lib/python3.10/site-packages (from matplotlib>=2.1.0->mmpycocotools) (1.4.4) Requirement already satisfied: numpy>=1.20 in /opt/conda/lib/python3.10/site-packages (from matplotlib>=2.1.0->mmpycocotools) (1.24.3) Requirement already satisfied: packaging>=20.0 in /opt/conda/lib/python3.10/site-packages (from matplotlib>=2.1.0->mmpycocotools) (23.0) Requirement already satisfied: pillow>=6.2.0 in /opt/conda/lib/python3.10/site-packages (from matplotlib>=2.1.0->mmpycocotools) (9.4.0) Requirement already satisfied: pyparsing<3.1,>=2.3.1 in /opt/conda/lib/python3.10/site-packages (from matplotlib>=2.1.0->mmpycocotools) (3.0.9) Requirement already satisfied: python-dateutil>=2.7 in /opt/conda/lib/python3.10/site-packages (from matplotlib>=2.1.0->mmpycocotools) (2.8.2) Requirement already satisfied: six>=1.5 in /opt/conda/lib/python3.10/site-packages (from python-dateutil>=2.7->matplotlib>=2.1.0->mmpycocotools) (1.16.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 ╰─> [25 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-cpython-310 creating build/lib.linux-x86_64-cpython-310/pycocotools copying pycocotools/init.py -> build/lib.linux-x86_64-cpython-310/pycocotools copying pycocotools/cocoeval.py -> build/lib.linux-x86_64-cpython-310/pycocotools copying pycocotools/coco.py -> build/lib.linux-x86_64-cpython-310/pycocotools copying pycocotools/mask.py -> build/lib.linux-x86_64-cpython-310/pycocotools running build_ext Compiling pycocotools/_mask.pyx because it changed. [1/1] Cythonizing pycocotools/_mask.pyx /opt/conda/lib/python3.10/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-pcfsrvhi/mmpycocotools_ca51639691c54c9eb1ef2c539f25db58/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-310 creating build/temp.linux-x86_64-cpython-310/common creating build/temp.linux-x86_64-cpython-310/pycocotools gcc -pthread -B /opt/conda/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/conda/include -fPIC -O2 -isystem /opt/conda/include -fPIC -I/opt/conda/lib/python3.10/site-packages/numpy/core/include -Icommon -I/opt/conda/include/python3.10 -c ../common/maskApi.c -o build/temp.linux-x86_64-cpython-310/../common/maskApi.o gcc: error: ../common/maskApi.c: No such file or directory gcc: fatal error: no input files 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 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

i want install mmpycocotools, can you help me?

keeper-jie commented 10 months ago

I also meet this problem, have you solved it?

mahmoudmhashem commented 8 months ago

Is it solved?

manhdan226 commented 5 months ago

downgrade cython to 0.29, instead of 0.30