简体   繁体   中英

Dlib installed but cannot open it- Mac M1

I installed the dlib package on my Mac M1 through anaconda, and when I type "conda list" in the terminal, I can see "dlib" being installed. But when I type "dlib --version" in the Terminal, I have this message "zsh: command not found: dlib". Furthermore, when I open Spyder, or Jupyter, and when I try to import dlib, the Kernel crashes. Can anyone help me with this? I have been struggling with this issue for so long... Thanks for the support!

I had the same problem. I uninstalled anaconda, reinstalled it, and I used pip install (cmake, boost, dlib) instead of Conda install. Both dlib and face_recognition worked.

I'm also facing same kind of issue, dlib installed successfully but cant import that.

from _dlib_pybind11 import * ImportError: dlopen(/Users/devashish/miniforge3/envs/ml/lib/python3.8/site-packages/_dlib_pybind11.cpython-38-darwin.so, 0x0002): symbol not found in flat namespace '_png_do_expand_palette_rgb8_neon'

getting this error message.

solved it by manually linking the libpng library for me:

brew install libpng
export C_INCLUDE_PATH=/opt/homebrew/Cellar/libpng/1.6.37/include
export LIBRARY_PATH=/opt/homebrew/Cellar/libpng/1.6.37/lib
pip3 install dlib --force-reinstall 

(replace 1.6.37 by your installed version of libpng)

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