Deep-Live-Cam icon indicating copy to clipboard operation
Deep-Live-Cam copied to clipboard

macOS Sonoma 14.6.1 - M1 32 Gb - Missing libc++.1.dylib

Open SlistInc opened this issue 1 year ago • 3 comments

Hi all,

I have trying to get to run Deep-Live-Cam but I am getting stuck at this error:

Traceback (most recent call last): File "/Users/X/Local_Documents/Local_Projects/Deep-Live-Cam/run.py", line 3, in <module> from modules import core File "/Users/X/Local_Documents/Local_Projects/Deep-Live-Cam/modules/core.py", line 20, in <module> import modules.ui as ui File "/Users/X/Local_Documents/Local_Projects/Deep-Live-Cam/modules/ui.py", line 10, in <module> from modules.face_analyser import get_one_face File "/Users/X/Local_Documents/Local_Projects/Deep-Live-Cam/modules/face_analyser.py", line 2, in <module> import insightface File "/opt/homebrew/Caskroom/miniconda/base/envs/test/lib/python3.10/site-packages/insightface/__init__.py", line 18, in <module> from . import app File "/opt/homebrew/Caskroom/miniconda/base/envs/test/lib/python3.10/site-packages/insightface/app/__init__.py", line 2, in <module> from .mask_renderer import * File "/opt/homebrew/Caskroom/miniconda/base/envs/test/lib/python3.10/site-packages/insightface/app/mask_renderer.py", line 8, in <module> from ..thirdparty import face3d File "/opt/homebrew/Caskroom/miniconda/base/envs/test/lib/python3.10/site-packages/insightface/thirdparty/face3d/__init__.py", line 3, in <module> from . import mesh File "/opt/homebrew/Caskroom/miniconda/base/envs/test/lib/python3.10/site-packages/insightface/thirdparty/face3d/mesh/__init__.py", line 9, in <module> from .cython import mesh_core_cython ImportError: dlopen(/opt/homebrew/Caskroom/miniconda/base/envs/test/lib/python3.10/site-packages/insightface/thirdparty/face3d/mesh/cython/mesh_core_cython.cpython-310-darwin.so, 0x0002): Library not loaded: @rpath/libc++.1.dylib Referenced from: <3CF8BEC7-7301-3ACC-90A6-CBC41134B979> /opt/homebrew/Caskroom/miniconda/base/envs/test/lib/python3.10/site-packages/insightface/thirdparty/face3d/mesh/cython/mesh_core_cython.cpython-310-darwin.so Reason: tried: '/opt/homebrew/Caskroom/miniforge/base/lib/libc++.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Caskroom/miniforge/base/lib/libc++.1.dylib' (no such file), '/opt/homebrew/Caskroom/miniforge/base/lib/libc++.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Caskroom/miniforge/base/lib/libc++.1.dylib' (no such file), '/opt/homebrew/Caskroom/miniconda/base/envs/test/bin/../lib/libc++.1.dylib' (no such file), '/opt/homebrew/Caskroom/miniconda/base/envs/test/bin/../lib/libc++.1.dylib' (no such file)

apparently the libc++.1.dylib cannot be found.

I tried different python versions, I tried different python versions, update and upgrade brew amongst other more obscure things. But I can't get rid of this error unfortunately. Maybe someone has an idea or I am doing something wrong?

SlistInc avatar Aug 13 '24 08:08 SlistInc

Try installing xcode tools using

xcode-select --install

Alternatively, I've got a script for installing all the prereqs for Mac OSX users that includes this (and for reinstalling as and when this project gets updated), which can be found here: https://github.com/storizzi/Deep-Live-Cam-Mac-Installer

storizzi avatar Aug 13 '24 14:08 storizzi

Thanks for the input. Unfortunately that was not the solution since I already have the developer tools installed.

xcode-select --install results in xcode-select: note: Command line tools are already installed. Use "Software Update" in System Settings or the softwareupdate command line interface to install updates

and

softwareupdate -i -a

results in

Software Update Tool

Finding available software
No updates are available.

There must be something else, I kept my system as updated as I could.

SlistInc avatar Aug 13 '24 14:08 SlistInc

I don't know about miniforge - maybe it is missing some common dependencies (as it's a bit newer than miniconda). Maybe worth trying miniconda.

I created myself an opinionated install chain for all the dependencies to get it at leat working on my laptop if that helps at all: https://github.com/storizzi/Deep-Live-Cam-Mac-Installer - albeit it's horribly slow due to the specific model being used only really utilising the CPU. You don't need to use it but the script might give a few ideas (e.g. trying miniconda rather than miniforge)

storizzi avatar Aug 13 '24 16:08 storizzi