isl-org / Open3D

Open3D: A Modern Library for 3D Data Processing
http://www.open3d.org
Other
11.53k stars 2.32k forks source link

pip install open3d on apple silicon Mac #6715

Open dev1virtuoso opened 8 months ago

dev1virtuoso commented 8 months ago

Checklist

Steps to reproduce the issue

I first cloned Open3D by:

git clone https://github.com/isl-org/Open3D.git
cd Open3D

Then, I install Open3D with:

pip install open3d

It shown

ERROR: Could not find a version that satisfies the requirement open3d (from versions: none)
ERROR: No matching distribution found for open3d

Error message

ERROR: Could not find a version that satisfies the requirement open3d (from versions: none)
ERROR: No matching distribution found for open3d

Open3D, Python and System information

- Operating system: macOS 14.4 (23E214)
- Python version: Python 3.12 
- Open3D version: v 0.18
- System architecture: apple-silicon
- Is this a remote workstation?: no
- How did you install Open3D?: pip 
- Compiler version (if built from source): /

Additional information

No response

dev1virtuoso commented 8 months ago

additional error message: git:(main) ✗ python /Users/tszsanwu/Desktop/Code/Project_Mojave/BlazePose/depthai_blazepose/demo.py Traceback (most recent call last): File "/Users/tszsanwu/Desktop/Code/Project_Mojave/BlazePose/depthai_blazepose/demo.py", line 3, in <module> from BlazeposeRenderer import BlazeposeRenderer File "/Users/tszsanwu/Desktop/Code/Project_Mojave/BlazePose/depthai_blazepose/BlazeposeRenderer.py", line 3, in <module> from o3d_utils import Visu3D File "/Users/tszsanwu/Desktop/Code/Project_Mojave/BlazePose/depthai_blazepose/o3d_utils.py", line 1, in <module> import open3d as o3d File "/Library/Frameworks/Python.framework/3.12/lib/python3.12/site-packages/open3d/__init__.py", line 11, in <module> from open3d.macos import * File "/Library/Frameworks/Python.framework/3.12/lib/python3.12/site-packages/open3d/macos/__init__.py", line 7, in <module> globals().update(importlib.import_module('open3d.macos.open3d').__dict__) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/3.12/lib/python3.12/importlib/__init__.py", line 90, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ImportError: dlopen(/Library/Frameworks/Python.framework/3.12/lib/python3.12/site-packages/open3d/macos/open3d.so, 0x0002): tried: '/Library/Frameworks/Python.framework/3.12/lib/python3.12/site-packages/open3d/macos/open3d.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/Python.framework/3.12/lib/python3.12/site-packages/open3d/macos/open3d.so' (no such file), '/Library/Frameworks/Python.framework/3.12/lib/python3.12/site-packages/open3d/macos/open3d.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'))

johnthagen commented 8 months ago

Open3D does not yet support Python 3.12. Follow this issue for support:

I would recommend installing Python 3.11 for now and install using that.

dev1virtuoso commented 7 months ago

thank you for your help, it helps a lot.

themightyoarfish commented 4 months ago

Same problem with python 3.11:

Traceback (most recent call last):
  File "project/file.py", line 14, in <module>
    import open3d as o3d
  File "project/venv/lib/python3.11/site-packages/open3d/__init__.py", line 93, in <module>
    from open3d.cpu.pybind import (core, camera, data, geometry, io, pipelines,
ImportError: dlopen(project/venv/lib/python3.11/site-packages/open3d/cpu/pybind.cpython-311-darwin.so, 0x0002): tried: 'project/venv/lib/python3.11/site-packages/open3d/cpu/pybind.cpython-311-darwin.so' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e)))
HarryHeres commented 1 month ago

Same problem with python 3.11:

Traceback (most recent call last):
  File "project/file.py", line 14, in <module>
    import open3d as o3d
  File "project/venv/lib/python3.11/site-packages/open3d/__init__.py", line 93, in <module>
    from open3d.cpu.pybind import (core, camera, data, geometry, io, pipelines,
ImportError: dlopen(project/venv/lib/python3.11/site-packages/open3d/cpu/pybind.cpython-311-darwin.so, 0x0002): tried: 'project/venv/lib/python3.11/site-packages/open3d/cpu/pybind.cpython-311-darwin.so' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e)))

I think this should solve your issue https://github.com/isl-org/Open3D/issues/6994

themightyoarfish commented 1 month ago

Hmm, this issue seems to involve Rosetta, which I am not using, is it still applicable?

HarryHeres commented 1 month ago

Hmm, this issue seems to involve Rosetta, which I am not using, is it still applicable?

Yes, feel free to try it out. Just replace open3d with the concrete link to the arm64 wheel in the GitHub releases in your case. Make sure you uninstall the non-functional open3d module first though.

themightyoarfish commented 1 month ago

Unfortunately none of the released wheels are installable to me, maybe because my macos version is 12.*. I just get

 pip install https://github.com/isl-org/Open3D/releases/download/v0.18.0/open3d-0.18.0-cp311-cp311-macosx_13_0_arm64.whl
ERROR: open3d-0.18.0-cp311-cp311-macosx_13_0_arm64.whl is not a supported wheel on this platform.
themightyoarfish commented 1 month ago

The website (https://www.open3d.org/docs/latest/getting_started.html#development-version-pip) links to a nonexistent wheel for macos arm with python 3.12: https://github.com/isl-org/Open3D/releases/download/main-devel/open3d-0.18.0+1a98853-cp312-cp312-macosx_10_15_universal2.whl

would be great if that was published.

dev1virtuoso commented 1 month ago

The website (https://www.open3d.org/docs/latest/getting_started.html#development-version-pip) links to a nonexistent wheel for macos arm with python 3.12: https://github.com/isl-org/Open3D/releases/download/main-devel/open3d-0.18.0+1a98853-cp312-cp312-macosx_10_15_universal2.whl

would be great if that was published.

https://github.com/isl-org/Open3D/releases/download/main-devel/open3d-0.18.0+2ae042a-cp312-cp312-macosx_10_15_universal2.whl

themightyoarfish commented 1 month ago

Unfortunately i cannot install this on macos 12.5 :/

ERROR: open3d-0.18.0+2ae042a-cp312-cp312-macosx_10_15_universal2.whl is not a supported wheel on this platform.