Python DLIB funktioniert nicht richtig auf Apple Silicon Chip (M4)

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Python DLIB funktioniert nicht richtig auf Apple Silicon Chip (M4)

by Anonymous » 28 Feb 2025, 05:55

Ich möchte DLIB auf Python verwenden. Ich habe es ohne Probleme installiert. Das Problem ist, dass ich, wenn ich versuche, es zu importieren

Code: Select all

Traceback (most recent call last):
File "/Users/elgamernovato/Projects/Free Code/Python/Test Proyecto Rene/test.py", line 1, in 
import dlib
File "/Users/elgamernovato/Projects/Free Code/Python/Test Proyecto Rene/venv/lib/python3.13/site-packages/dlib/__init__.py", line 19, in 
from _dlib_pybind11 import *
ImportError:
dlopen(/Users/elgamernovato/Projects/Free Code/Python/Test Proyecto Rene/venv/lib/python3.13/site-packages/_dlib_pybind11.cpython-313-darwin.so, 0x0002):
tried:
'/Users/elgamernovato/Projects/Free Code/Python/Test Proyecto Rene/venv/lib/python3.13/site-packages/_dlib_pybind11.cpython-313-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')),
'/System/Volumes/Preboot/Cryptexes/OS/Users/elgamernovato/Projects/Free Code/Python/Test Proyecto Rene/venv/lib/python3.13/site-packages/_dlib_pybind11.cpython-313-darwin.so' (no such file),
'/Users/elgamernovato/Projects/Free Code/Python/Test Proyecto Rene/venv/lib/python3.13/site-packages/_dlib_pybind11.cpython-313-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'))
< /code>
Ich habe CMake, Boost und Openblas mit Brew installiert. Ich habe DLIB erneut für Arm installiert: < /p>
CMAKE_PREFIX_PATH=$(brew --prefix) arch -arm64 pip install dlib --no-binary dlib
< /code>
, aber immer noch der gleiche Fehler.arch -arm64 python3 -c "import platform; print(platform.machine())"
Am Terminal habe ich Uname -m ausgeführt, um zu bestätigen, dass ich ARM64 verwende.>

Top