requirements: ❌ Command 'pip install --no-cache "onnx>=1.12.0" ' returned non-zero exit status 1.
ONNX: export failure ❌ 13.4s: No module named 'onnx'
Traceback (most recent call last):
File "<frozen runpy>", line 198, in run_module_as_main
File "<frozen runpy>", line 88, in run_code
File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Scripts\yolo.exe_main.py", line 7, in <module>
File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Lib\site-packages\ultralytics\cfg_init.py", line 448, in entrypoint
getattr(model, mode)(**overrides) # default args from model
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Lib\site-packages\ultralytics\engine\model.py", line 310, in export
return Exporter(overrides=args, _callbacks=self.callbacks)(model=self.model)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Lib\site-packages\ultralytics\engine\exporter.py", line 254, in call
f[2], _ = self.export_onnx()
^^^^^^^^^^^^^^^^^^
File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Lib\site-packages\ultralytics\engine\exporter.py", line 122, in outer_func
raise e
File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Lib\site-packages\ultralytics\engine\exporter.py", line 117, in outer_func
f, model = inner_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\PC\AppData\Local\Programs\Python\Python311\Lib\site-packages\ultralytics\engine\exporter.py", line 317, in export_onnx
import onnx # noqa
^^^^^^^^^^^
ModuleNotFoundError: No module named 'onnx'
#IndexError: index 1 is out of bounds for dimension 1 with size 1
6 messages · Page 1 of 1 (latest)
ONNX: export failure ❌ 13.4s: No module named 'onnx'
That mean you dont have 'onnx' installed
okay so i CLI in CMD " pip install --no-cache "onnx>=1.12.0 ' and get this 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.