找不到自制程序库

问题描述 投票:0回答:0

我在 MacOS 13.1 (Ventura) 上使用 M1 芯片组。

我使用自制软件作为包管理器,我的库安装在

/opt/homebrew/Cellar
中。 这个文件夹路径在我的
$PATH
当我尝试安装一些软件包时,例如
deepforest
和 pip,我以错误告终,说我错过了一些库:

/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"

所以我发现我可以用 var

CFLAGS
这样解决这个问题:

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

但是每次我想安装新包时,我都必须为每个库手动执行此操作。

有没有办法只给出路径

/opt/homebrew/Cellar
,这样 pip 和其他所有包管理器都会在那里寻找库?

pip homebrew libraries
© www.soinside.com 2019 - 2024. All rights reserved.