• Hardware
  • MacOS installation problem - missing library

Upon trying to install my new OAK-D Lite camera, I ran into a problem described by MacOS as follows:

dyld: Library not loaded: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation

  Referenced from: /Library/Frameworks/Python.framework/Versions/3.4/Resources/Python.app/Contents/MacOS/Python

  Reason: image not found

Abort trap: 6
_

This happens if I try to run any of the following terminal commands:

a) bash -c "$(curl -fL https://docs.luxonis.com/install_depthai.sh)"
b) python3 depthai_demo.py

I have already run the following command:

$ sudo curl -fL https://docs.luxonis.com/install_dependencies.sh | bash

And finished installing Homebrew and running the "brew update" according to the provided instructions, however I can't figure out what I should do next.

If anybody can shed any light on the matter, I would really appreciate it.

Thank you!

  • erik replied to this.

    Hi gsaloma ,
    Copying from gpt4:


    The error you encountered seems to be related to a missing or improperly installed library on your system. The error message suggests that the CoreFoundation framework is either missing or not loaded properly. To resolve this issue, you can try the following solutions:

    Reinstall OpenCV:
    Uninstall the current OpenCV version and reinstall it using the following commands:

    pip uninstall opencv-python opencv-python-headless
    pip install opencv-python opencv-python-headless

    Update your system:
    Updating your operating system can sometimes resolve issues related to missing or improperly installed libraries. On macOS, you can update your system through the System Preferences app or by running the following command in the terminal:

    softwareupdate --install --all

    After updating your system, restart your computer and try running the script again.

    Check if CoreFoundation framework is present:
    Navigate to /System/Library/Frameworks/CoreFoundation.framework/Versions/A/ on your system and verify if the CoreFoundation framework is present. If it's missing, you might need to reinstall macOS to resolve the issue.

    If the problem persists, you can try using a different Python environment by creating a new virtual environment:

    python3 -m venv venv
    source venv/bin/activate
    pip install opencv-python opencv-python-headless numpy

    Then, run your script within the virtual environment.

    If none of the solutions above resolve the issue, please provide more information about your system, such as the operating system version and Python version, so I can further assist you.