Skip to content

Commit

Permalink
Pin numpy<=2.0.0 on macOS (ultralytics#17221)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher authored Oct 28, 2024
1 parent e1e5460 commit da1bf9d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ classifiers = [

# Required dependencies ------------------------------------------------------------------------------------------------
dependencies = [
"numpy>=1.23.0", # temporary patch for compat errors https://github.com/ultralytics/yolov5/actions/runs/9538130424/job/26286956354
"numpy>=1.23.0",
"numpy<2.0.0; sys_platform == 'darwin'", # macOS OpenVINO errors https://github.com/ultralytics/ultralytics/pull/17221
"matplotlib>=3.3.0",
"opencv-python>=4.6.0",
"pillow>=7.1.2",
Expand Down
1 change: 1 addition & 0 deletions ultralytics/engine/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ def export_onnx(self, prefix=colorstr("ONNX:")):
@try_export
def export_openvino(self, prefix=colorstr("OpenVINO:")):
"""YOLO OpenVINO export."""
# WARNING: numpy>=2.0.0 issue with OpenVINO on macOS https://github.com/ultralytics/ultralytics/pull/17221
check_requirements(f'openvino{"<=2024.0.0" if ARM64 else ">=2024.0.0"}') # fix OpenVINO issue on ARM64
import openvino as ov

Expand Down

0 comments on commit da1bf9d

Please sign in to comment.