You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey folks, I encountered some difficulties getting ORB models to run on my 2023 Macbook Pro (Apple Silicon, M3 Pro). I figured I'd document the steps I took, since others might have these same issues and it might be worth making a note in README.md.
Problem
Running:
$ pip install "pynanoflann@git+https://github.com/dwastberg/pynanoflann#egg=af434039ae14bedcbb838a7808924d6689274168",
$ python
>>> import pynanoflann
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/cwagen/micromamba/envs/nnp/lib/python3.12/site-packages/pynanoflann/__init__.py", line 1, in <module>
from .nanoflann import KDTree, batched_kneighbors
File "/Users/cwagen/micromamba/envs/nnp/lib/python3.12/site-packages/pynanoflann/nanoflann.py", line 6, in <module>
from . import nanoflann_ext
ImportError: dlopen(/Users/cwagen/micromamba/envs/nnp/lib/python3.12/site-packages/pynanoflann/nanoflann_ext.cpython-312-darwin.so, 0x0002): tried: '/Users/cwagen/micromamba/envs/nnp/lib/python3.12/site-packages/pynanoflann/nanoflann_ext.cpython-312-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/cwagen/micromamba/envs/nnp/lib/python3.12/site-packages/pynanoflann/nanoflann_ext.cpython-312-darwin.so' (no such file), '/Users/cwagen/micromamba/envs/nnp/lib/python3.12/site-packages/pynanoflann/nanoflann_ext.cpython-312-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
My Solution
(1) Clone pynanoflann
$ git clone https://github.com/dwastberg/pynanoflann.git
$ cd pynanoflann
(2) Modify their CMakeLists.txt file and add the following lines (these became lines 10–13 in the new file):
if(APPLE)
# Ensure compatibility with ARM64 architecture on macOS
set(CMAKE_OSX_ARCHITECTURES "arm64" CACHE STRING "Build architecture" FORCE)
endif()
(3) Install the modified version into whatever environment:
$ pip install .
The text was updated successfully, but these errors were encountered:
Hey folks, I encountered some difficulties getting ORB models to run on my 2023 Macbook Pro (Apple Silicon, M3 Pro). I figured I'd document the steps I took, since others might have these same issues and it might be worth making a note in
README.md
.Problem
Running:
My Solution
(1) Clone
pynanoflann
(2) Modify their
CMakeLists.txt
file and add the following lines (these became lines 10–13 in the new file):(3) Install the modified version into whatever environment:
$ pip install .
The text was updated successfully, but these errors were encountered: