简体   繁体   中英

dlib import failure on M1 pro

after installing dlib successfully on my m1 pro mac (monterey 12.1)在此处输入图像描述

whenever I try to import dlib, I am receiving the following error:

     from _dlib_pybind11 import *
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
ImportError: 
dlopen(path/to/venv/lib/python3.10/site-packages/_dlib_pybind11.cpython-310-darwin.so, 0x0002): tried: '/path/to/venv/lib/python3.10/site-packages/_dlib_pybind11.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/_dlib_pybind11.cpython-310-darwin.so' (no such file)

installing dlib==19.23.0 solves this issue

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM