Deci-AI / super-gradients

Easily train or fine-tune SOTA computer vision models with one open source training library. The home of Yolo-NAS.
https://www.supergradients.com
Apache License 2.0
4.54k stars 496 forks source link

Installation error: error: subprocess-exited-with-error #1944

Closed andysingal closed 5 months ago

andysingal commented 6 months ago

🐛 Describe the bug

pip install super-gradients
Collecting super-gradients
  Downloading super_gradients-3.7.0-py3-none-any.whl.metadata (41 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.7/41.7 kB 984.1 kB/s eta 0:00:00
Requirement already satisfied: torch>=1.9.0 in /Users/ankushsingal/Desktop/YOLO-prac/YOLO-web-development/venv/lib/python3.11/site-packages (from super-gradients) (2.2.2)
Collecting tqdm>=4.57.0 (from super-gradients)
  Using cached tqdm-4.66.2-py3-none-any.whl.metadata (57 kB)
Collecting boto3>=1.17.15 (from super-gradients)
  Downloading boto3-1.34.75-py3-none-any.whl.metadata (6.6 kB)
Collecting jsonschema>=3.2.0 (from super-gradients)
  Using cached jsonschema-4.21.1-py3-none-any.whl.metadata (7.8 kB)
Collecting Deprecated>=1.2.11 (from super-gradients)
  Using cached Deprecated-1.2.14-py2.py3-none-any.whl.metadata (5.4 kB)
Collecting scipy>=1.6.1 (from super-gradients)
  Downloading scipy-1.12.0-cp311-cp311-macosx_10_9_x86_64.whl.metadata (60 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 60.4/60.4 kB 3.2 MB/s eta 0:00:00
Collecting matplotlib>=3.3.4 (from super-gradients)
  Downloading matplotlib-3.8.3-cp311-cp311-macosx_10_12_x86_64.whl.metadata (5.8 kB)
Collecting psutil>=5.8.0 (from super-gradients)
  Downloading psutil-5.9.8-cp36-abi3-macosx_10_9_x86_64.whl.metadata (21 kB)
Collecting tensorboard>=2.4.1 (from super-gradients)
  Downloading tensorboard-2.16.2-py3-none-any.whl.metadata (1.6 kB)
Collecting setuptools>=65.5.1 (from super-gradients)
  Downloading setuptools-69.2.0-py3-none-any.whl.metadata (6.3 kB)
Collecting coverage~=5.3.1 (from super-gradients)
  Using cached coverage-5.3.1.tar.gz (684 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: torchvision>=0.10.0 in /Users/ankushsingal/Desktop/YOLO-prac/YOLO-web-development/venv/lib/python3.11/site-packages (from super-gradients) (0.17.2)
Collecting sphinx~=4.0.2 (from super-gradients)
  Downloading Sphinx-4.0.3-py3-none-any.whl.metadata (8.0 kB)
Collecting sphinx-rtd-theme (from super-gradients)
  Using cached sphinx_rtd_theme-2.0.0-py2.py3-none-any.whl.metadata (4.4 kB)
Collecting torchmetrics==0.8 (from super-gradients)
  Downloading torchmetrics-0.8.0-py3-none-any.whl.metadata (20 kB)
Collecting hydra-core>=1.2.0 (from super-gradients)
  Downloading hydra_core-1.3.2-py3-none-any.whl.metadata (5.5 kB)
Collecting omegaconf (from super-gradients)
  Downloading omegaconf-2.3.0-py3-none-any.whl.metadata (3.9 kB)
Collecting onnxruntime==1.15.0 (from super-gradients)
  Downloading onnxruntime-1.15.0-cp311-cp311-macosx_10_15_x86_64.whl.metadata (3.9 kB)
Collecting onnx==1.15.0 (from super-gradients)
  Downloading onnx-1.15.0-cp311-cp311-macosx_10_12_x86_64.whl.metadata (15 kB)
Requirement already satisfied: pillow>=10.2.0 in /Users/ankushsingal/Desktop/YOLO-prac/YOLO-web-development/venv/lib/python3.11/site-packages (from super-gradients) (10.3.0)
Collecting pip-tools>=6.12.1 (from super-gradients)
  Downloading pip_tools-7.4.1-py3-none-any.whl.metadata (26 kB)
Collecting einops==0.3.2 (from super-gradients)
  Downloading einops-0.3.2-py3-none-any.whl.metadata (10 kB)
Collecting protobuf==3.20.3 (from super-gradients)
  Downloading protobuf-3.20.3-py2.py3-none-any.whl.metadata (720 bytes)
Collecting treelib==1.6.1 (from super-gradients)
  Using cached treelib-1.6.1.tar.gz (24 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting termcolor==1.1.0 (from super-gradients)
  Using cached termcolor-1.1.0.tar.gz (3.9 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting packaging>=20.4 (from super-gradients)
  Downloading packaging-24.0-py3-none-any.whl.metadata (3.2 kB)
Collecting wheel>=0.38.0 (from super-gradients)
  Using cached wheel-0.43.0-py3-none-any.whl.metadata (2.2 kB)
Collecting pygments>=2.7.4 (from super-gradients)
  Using cached pygments-2.17.2-py3-none-any.whl.metadata (2.6 kB)
Collecting stringcase>=1.2.0 (from super-gradients)
  Using cached stringcase-1.2.0.tar.gz (3.0 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting numpy<=1.23 (from super-gradients)
  Downloading numpy-1.23.0.tar.gz (10.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.7/10.7 MB 5.8 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting rapidfuzz (from super-gradients)
  Downloading rapidfuzz-3.7.0-cp311-cp311-macosx_10_9_x86_64.whl.metadata (11 kB)
Collecting json-tricks==3.16.1 (from super-gradients)
  Downloading json_tricks-3.16.1-py2.py3-none-any.whl.metadata (17 kB)
Collecting onnxsim<1.0,>=0.4.3 (from super-gradients)
  Downloading onnxsim-0.4.36-cp311-cp311-macosx_10_15_universal2.whl.metadata (4.3 kB)
Collecting data-gradients~=0.3.1 (from super-gradients)
  Downloading data_gradients-0.3.2-py3-none-any.whl.metadata (21 kB)
Collecting albumentations~=1.3 (from super-gradients)
  Downloading albumentations-1.4.2-py3-none-any.whl.metadata (36 kB)
Collecting fonttools>=4.43.0 (from super-gradients)
  Downloading fonttools-4.50.0-cp311-cp311-macosx_10_9_x86_64.whl.metadata (159 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 159.4/159.4 kB 4.9 MB/s eta 0:00:00
Collecting werkzeug>=2.3.8 (from super-gradients)
  Downloading werkzeug-3.0.2-py3-none-any.whl.metadata (4.1 kB)
Collecting coloredlogs (from onnxruntime==1.15.0->super-gradients)
  Downloading coloredlogs-15.0.1-py2.py3-none-any.whl.metadata (12 kB)
Collecting flatbuffers (from onnxruntime==1.15.0->super-gradients)
  Downloading flatbuffers-24.3.25-py2.py3-none-any.whl.metadata (850 bytes)
INFO: pip is looking at multiple versions of onnxruntime to determine which version is compatible with other requirements. This could take a while.
Collecting super-gradients
  Downloading super_gradients-3.6.1-py3-none-any.whl.metadata (41 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.4/41.4 kB 3.5 MB/s eta 0:00:00
Collecting pyparsing==2.4.5 (from super-gradients)
  Using cached pyparsing-2.4.5-py2.py3-none-any.whl.metadata (3.6 kB)
Collecting super-gradients
  Downloading super_gradients-3.6.0-py3-none-any.whl.metadata (40 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 40.1/40.1 kB 69.6 kB/s eta 0:00:00
Requirement already satisfied: setuptools>=21.0.0 in /Users/ankushsingal/Desktop/YOLO-prac/YOLO-web-development/venv/lib/python3.11/site-packages (from super-gradients) (65.5.0)
INFO: pip is looking at multiple versions of super-gradients to determine which version is compatible with other requirements. This could take a while.
  Using cached super_gradients-3.5.0-py3-none-any.whl.metadata (39 kB)
Requirement already satisfied: opencv-python>=4.5.1 in /Users/ankushsingal/Desktop/YOLO-prac/YOLO-web-development/venv/lib/python3.11/site-packages (from super-gradients) (4.9.0.80)
  Downloading super_gradients-3.4.1-py3-none-any.whl.metadata (37 kB)
  Downloading super_gradients-3.4.0-py3-none-any.whl.metadata (37 kB)
  Downloading super_gradients-3.3.1-py3-none-any.whl.metadata (37 kB)
  Downloading super_gradients-3.3.0-py3-none-any.whl.metadata (37 kB)
  Using cached super_gradients-3.2.1-py3-none-any.whl.metadata (35 kB)
  Downloading super_gradients-3.2.0-py3-none-any.whl.metadata (35 kB)
INFO: pip is still looking at multiple versions of super-gradients to determine which version is compatible with other requirements. This could take a while.
  Downloading super_gradients-3.1.3-py3-none-any.whl.metadata (35 kB)
  Downloading super_gradients-3.1.2-py3-none-any.whl.metadata (35 kB)
  Downloading super_gradients-3.1.1-py3-none-any.whl.metadata (36 kB)
  Using cached super_gradients-3.1.0-py3-none-any.whl.metadata (36 kB)
  Downloading super_gradients-3.0.9-py3-none-any.whl.metadata (34 kB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C.
  Downloading super_gradients-3.0.8-py3-none-any.whl.metadata (32 kB)
  Downloading super_gradients-3.0.7-py3-none-any.whl.metadata (32 kB)
  Downloading super_gradients-3.0.6-py3-none-any.whl.metadata (30 kB)
  Downloading super_gradients-3.0.5-py3-none-any.whl.metadata (30 kB)
  Downloading super_gradients-3.0.4-py3-none-any.whl.metadata (30 kB)
  Downloading super_gradients-3.0.3-py3-none-any.whl.metadata (26 kB)
Collecting onnxruntime (from super-gradients)
  Downloading onnxruntime-1.16.3-cp311-cp311-macosx_10_15_x86_64.whl.metadata (4.3 kB)
Collecting onnx>=1.10.1 (from super-gradients)
  Downloading onnx-1.16.0-cp311-cp311-macosx_10_15_x86_64.whl.metadata (16 kB)
Collecting pycocotools==2.0.4 (from super-gradients)
  Using cached pycocotools-2.0.4.tar.gz (106 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting protobuf~=3.19.0 (from super-gradients)
  Downloading protobuf-3.19.6-py2.py3-none-any.whl.metadata (828 bytes)
Requirement already satisfied: numpy in /Users/ankushsingal/Desktop/YOLO-prac/YOLO-web-development/venv/lib/python3.11/site-packages (from pycocotools==2.0.4->super-gradients) (1.26.4)
Collecting pyDeprecate==0.3.* (from torchmetrics==0.8->super-gradients)
  Downloading pyDeprecate-0.3.2-py3-none-any.whl.metadata (10 kB)
Collecting future (from treelib==1.6.1->super-gradients)
  Downloading future-1.0.0-py3-none-any.whl.metadata (4.0 kB)
INFO: pip is looking at multiple versions of onnx to determine which version is compatible with other requirements. This could take a while.
Collecting onnx>=1.10.1 (from super-gradients)
  Downloading onnx-1.14.1-cp311-cp311-macosx_10_12_x86_64.whl.metadata (15 kB)
  Downloading onnx-1.14.0-cp311-cp311-macosx_10_12_x86_64.whl.metadata (15 kB)
  Downloading onnx-1.13.1-cp311-cp311-macosx_10_12_x86_64.whl.metadata (14 kB)
  Downloading onnx-1.13.0-cp311-cp311-macosx_10_12_x86_64.whl.metadata (14 kB)
  Downloading onnx-1.12.0.tar.gz (10.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.1/10.1 MB 6.9 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [21 lines of output]
      fatal: not a git repository (or any of the parent directories): .git
      Traceback (most recent call last):
        File "/Users/ankushsingal/Desktop/YOLO-prac/YOLO-web-development/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/ankushsingal/Desktop/YOLO-prac/YOLO-web-development/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/ankushsingal/Desktop/YOLO-prac/YOLO-web-development/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/n0/v90bqwgn72g49ddsyhfnvc4c0000gn/T/pip-build-env-csgm994h/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/n0/v90bqwgn72g49ddsyhfnvc4c0000gn/T/pip-build-env-csgm994h/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/n0/v90bqwgn72g49ddsyhfnvc4c0000gn/T/pip-build-env-csgm994h/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 487, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/private/var/folders/n0/v90bqwgn72g49ddsyhfnvc4c0000gn/T/pip-build-env-csgm994h/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 81, in <module>
      AssertionError: Could not find cmake executable!
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build 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.

Versions

python collect_env.py
Collecting environment information...
PyTorch version: 2.2.2
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 14.2.1 (x86_64)
GCC version: Could not collect
Clang version: 15.0.0 (clang-1500.1.0.2.5)
CMake version: Could not collect
Libc version: N/A

Python version: 3.11.4 (main, Jul  5 2023, 08:41:25) [Clang 14.0.6 ] (64-bit runtime)
Python platform: macOS-10.16-x86_64-i386-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Intel(R) Core(TM) i5-8500 CPU @ 3.00GHz

Versions of relevant libraries:
[pip3] numpy==1.26.4
[pip3] torch==2.2.2
[pip3] torchaudio==2.2.2
[pip3] torchvision==0.17.2
[conda] numpy                     1.26.0                   pypi_0    pypi
[conda] open-clip-torch           2.22.0                   pypi_0    pypi
[conda] torch                     2.1.0                    pypi_0    pypi
[conda] torchvision               0.16.0                   pypi_0    pypi
BloodAxe commented 6 months ago

SG uses pretty old pinned onnx version which is addressed here https://github.com/Deci-AI/super-gradients/pull/1946 And this version of onnx does not have prebuilt wheels on PyPi for your python version. Since prebuilt wheels are not available a pip attempts to compile it locally. But this step fails since you dont have C++ compiler present. A few options to solve that: 1) Downgrade to python 3.9 or something 2) Get C++ compiler & cmake 3) Wait until we release 3.7.1 with a fix