From 87c1e8f5a2eb3a2b17f2a1f1c182b22fbb025483 Mon Sep 17 00:00:00 2001 From: Peter Corke Date: Thu, 13 Aug 2026 16:48:52 +1000 Subject: [PATCH] fix: correct stale open3d-python PyPI name, add py3.13 exclusion marker The `open3d` extra pointed at `open3d-python`, an abandoned package last released as 0.7.0.0 -- the real, actively maintained package is just `open3d` (currently 0.19.0). Also add a `python_version < '3.13'` marker since open3d doesn't ship 3.13 wheels yet, so `[open3d]` and `[all]` resolve cleanly across the full supported Python range instead of failing outright on 3.13. Fixes part of #46 (package name + marker); CI matrix wiring for the open3d-supported Python legs is left for a follow-up. --- pyproject.toml | 4 ++-- src/machinevisiontoolbox/PointCloud.py | 8 ++++---- src/machinevisiontoolbox/Sources.py | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 710a2a2e..076214c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -86,7 +86,7 @@ docs = [ jupyter = ["ipywidgets", "ipympl"] -open3d = ["open3d-python"] +open3d = ["open3d; python_version < '3.13'"] torch = ["torch"] @@ -95,7 +95,7 @@ ocr = ["pytesseract"] all = [ "ipywidgets", "ipympl", - "open3d-python", + "open3d; python_version < '3.13'", "torch", "pytesseract", "rosbags", diff --git a/src/machinevisiontoolbox/PointCloud.py b/src/machinevisiontoolbox/PointCloud.py index aa848667..8611e5df 100644 --- a/src/machinevisiontoolbox/PointCloud.py +++ b/src/machinevisiontoolbox/PointCloud.py @@ -26,7 +26,7 @@ def __init__(self, arg: Any, depth_scale: float = 1.0, **kwargs) -> None: :type arg: :obj:`o3d.geometry.PointCloud`, :obj:`~machinevisiontoolbox.PointCloud`, ndarray(3,N) :param depth_scale: depth scale factor, defaults to 1.0 :type depth_scale: float, optional - :raises RuntimeError: PointCloud class requires Open3D to be installed: pip install open3d-python or pip install machinevision-toolbox-python[open3d] + :raises RuntimeError: PointCloud class requires Open3D to be installed: pip install open3d or pip install machinevision-toolbox-python[open3d] :raises ValueError: bad arguments This object wraps an Open3D :obj:`open3d.geometry.PointCloud` object. It can be @@ -50,7 +50,7 @@ def __init__(self, arg: Any, depth_scale: float = 1.0, **kwargs) -> None: if not _open3d: raise RuntimeError( "PointCloud class requires Open3D to be installed: " - "pip install open3d-python or " + "pip install open3d or " "pip install machinevision-toolbox-python[open3d]\n" " ** Note that Open3d typically does not run on the latest Python version(s)" ) @@ -60,7 +60,7 @@ def __init__(self, arg: Any, depth_scale: float = 1.0, **kwargs) -> None: if not _open3d: raise RuntimeError( "PointCloud class requires Open3D to be installed: " - "pip install open3d-python or " + "pip install open3d or " "pip install machinevision-toolbox-python[open3d]" ) @@ -273,7 +273,7 @@ def DepthImage( :type rgb: :class:`~machinevisiontoolbox.Image`, optional :param depth_scale: depth scale factor, defaults to 1.0 :type depth_scale: float, optional - :raises RuntimeError: PointCloud class requires Open3D to be installed: pip install open3d-python or pip install machinevision-toolbox-python[open3d] + :raises RuntimeError: PointCloud class requires Open3D to be installed: pip install open3d or pip install machinevision-toolbox-python[open3d] :raises ValueError: input images has wrong number of planes The depth image is converted to a point cloud using the Open3D, and the pixel diff --git a/src/machinevisiontoolbox/Sources.py b/src/machinevisiontoolbox/Sources.py index 3658fd95..d3d7baba 100644 --- a/src/machinevisiontoolbox/Sources.py +++ b/src/machinevisiontoolbox/Sources.py @@ -2346,7 +2346,7 @@ def _pointcloud_to_ros_message( if not _open3d_available: raise ImportError( "open3d is required for PointCloud publish support. " - "Install it with: pip install open3d-python " + "Install it with: pip install open3d " "or pip install machinevision-toolbox-python[open3d]" ) assert o3d is not None @@ -3573,7 +3573,7 @@ def __iter__(self) -> Iterator[Any]: if not _open3d_available: raise ImportError( "open3d is required to read PointCloud2 messages. " - "Install it with: pip install open3d-python " + "Install it with: pip install open3d " "or pip install machinevision-toolbox-python[open3d]" ) assert o3d is not None @@ -3770,7 +3770,7 @@ def disp( if not _open3d_available: raise ImportError( "open3d is required for point cloud display. " - "Install it with: pip install open3d-python " + "Install it with: pip install open3d " "or pip install machinevision-toolbox-python[open3d]" ) assert o3d is not None