isl-org / isl-org/Open3D

Invalid wheel selected for MacOS running in Rosetta

Open
#6,994 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
14k
Forks
2.6k
Avg merge
5d 18h
Merged PRs (30d)
6

Description

### Checklist

- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [X] For Python issues, I have tested with the [latest development wheel](https://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](https://www.open3d.org/docs/release/) and the [latest documentation](https://www.open3d.org/docs/latest/) (for `main` branch).

### Steps to reproduce the issue

Hi!

So firstly, I'd like to provide some context. I'm running an M1 Pro MBP 16" and I'm using the [3D Slicer](https://www.slicer.org/) application, which runs on mac **only** in Rosetta. Up until Open3D version **0.17.0**, the installation process was great since it recognized that the python interpreter is running under Rosetta.

However, with version **0.18.0**, when trying to install the Open3D library, I have noticed that the `universal` wheel is being pulled by the `pip install open3d` command. In previous versions, the `x86_64` wheel was being installed.

Eversince the `universal` wheel, the installation goes on fine, but when importing the module, it results in the error described below. When installed directly using

```
pip install https://github.com/isl-org/Open3D/releases/download/v0.18.0/open3d-0.18.0-cp39-cp39-macosx_11_0_x86_64.whl
```

it works as intended.

### Error message

```shell
Traceback (most recent call last):
File "", line 1, in
File "/Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages/open3d/__init__.py", line 93, in
from open3d.cpu.pybind import (core, camera, data, geometry, io, pipelines,
ImportError: dlopen(/Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages/open3d/cpu/pybind.cpython-39-darwin.so, 0x0002): tried: '/Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages/open3d/cpu/pybind.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages/open3d/cpu/pybind.cpython-39-darwin.so' (no such file), '/Applications/Slicer.app/Contents/lib/Python/lib/python3.9/site-packages/open3d/cpu/pybind.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
```

### Open3D, Python and System information

```markdown
- Operating system: macOS
- Python version: Python 3.9 (cp39)
- Open3D version: 0.18.0
- System architecture: x86 (under Rosetta)
- Is this a remote workstation?: no
- How did you install Open3D?: pip
```

### Additional information

Output of `pip install open3d`:

```
Collecting open3d
Using cached open3d-0.18.0-cp39-cp39-macosx_13_0_universal2.whl.metadata (4.1 kB)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the `pip install open3d` selection on an M1 Mac running Python under Rosetta, comparing the 0.18.0 universal2 and x86_64 wheel behavior. Inspect the wheel metadata and installation path involved in selecting the architecture. Done means the default installation imports successfully under Rosetta without requiring the direct x86_64 wheel URL.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.