Linked Questions

Popular Questions

homebrew library not found

Asked by At

I'm on MacOS 13.1 (Ventura) with a M1 chipset.

I'm using homebrew as package manager and my libraries are in installed in /opt/homebrew/Cellar. This folder path is in my $PATH When I try to install some packages, by example deepforest with pip, I end up with error saying I miss some libraries :

/opt/homebrew/lib/python3.11/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with "          "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
      #warning "Using deprecated NumPy API, disable it with " \
       ^
      imagecodecs/_aec.c:756:10: fatal error: 'libaec.h' file not found
      #include "libaec.h"

So I found that I could solve this with the var CFLAGSthis way:

export CFLAGS="-I/usr/local/include -I/opt/homebrew/Cellar/libaec/1.0.6/include/"

But then I have to do this manually for each libraries everytime I want to install a new package.

Is there a way to just give the path /opt/homebrew/Cellar so that pip and every other package manager will look for libraries there ?

Related Questions