简而言之, libheif 存在,但 libheif/heif.h 不存在(?)。
我试过了 一)
$ pip3 安装 pyheif
-- 出现错误:
""""""""""
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -Wno-error=unreachable-code -I/usr/local/include -I/usr/include -I/opt/local/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c build/temp.macosx-10.9-universal2-3.9/_libheif_cffi.c -o
build/temp.macosx-10.9-universal2-3.9/build/temp.macosx-10.9-universal2-3.9/_libheif_cffi.o
build/temp.macosx-10.9-universal2-3.9/_libheif_cffi.c:570:15: fatal error: 'libheif/heif.h' file not found
#include "libheif/heif.h"
^~~~~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
""""""""""
简而言之,
致命错误:找不到“libheif/heif.h”文件
但是 libheif 似乎安装得很好:
>> $ brew install libffi libheif
==> Downloading https://formulae.brew.sh/api/formula.jws.json
-#O=# # #
==> Downloading https://formulae.brew.sh/api/cask.jws.json
-#O=# # #
Warning: libffi 3.4.4 is already installed and up-to-date.
To reinstall 3.4.4, run:
brew reinstall libffi
Warning: libheif 1.17.6 is already installed and up-to-date.
To reinstall 1.17.6, run:
brew reinstall libheif
>> $
1-b)变体“sudo python3 -m pip install pyheif”给出了相同的错误:
fatal error: 'libheif/heif.h' file not found
#include "libheif/heif.h"
^~~~~~~~~~~~~~~~
>> $ pip install git+https://github.com/carsales/pyheif.git
-- same error:
Fatal error: 'libheif/heif.h' file not found
#include "libheif/heif.h"
^~~~~~~~~~~~~~~~
1 error generated.
请帮忙。
在 pip install git+https://github.com/carsales/pyheif.git 之前运行brew install libffi libheif
[在此处输入链接描述][从此处]