无法在MacBookPro上安装python中的py3exiv2

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

pip3 install py3exiv2 给出错误:

In file included from src/exiv2wrapper.cpp:27:
      src/exiv2wrapper.hpp:33:10: fatal error: 'exiv2/exiv2.hpp' file not found
         33 | #include "exiv2/exiv2.hpp"

https://exiv2.org/download.html下载 exiv2 库并将其复制到 /usr/local/

la /usr/local/include/exiv2/exiv2.hpp <== Available there
-rw-r--r--@ 1 me  staff   1,3K 13 fév 12:35 /usr/local/include/exiv2/exiv2.hpp

Mac 上 Python 全局库的位置? 为我提供了放置 exiv2 包含的位置

cp -R /usr/local/include/exiv2 /Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/
cp -R /usr/local/Cellar/boost/1.78.0_1/include/boost /Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/

Python 3.12.3 MacOS 索诺玛 14.5

我什至尝试了这个 stackflow 上的所有内容:无法使用 pip 安装 py3exiv2?

尝试从github下载:

git clone https://github.com/auphofBSF/py3exiv2.git 

sudo python3 configure.py 给出此错误... 找不到 libboost_python-3,请使用选项 --libboost=FILE

所以我安装了boost-python3但找不到libboost_python-3文件!

brew install boost-python3 but no libboost_python-3

la /usr/local/Cellar/boost/1.78.0_1/lib/

...
-r--r--r--   1 me  admin   6,3M  2 déc  2021 libboost_program_options.a
-r--r--r--   1 me  admin   518K 23 mai  2022 libboost_program_options.dylib
-r--r--r--   1 me  admin   165K  2 déc  2021 libboost_random-mt.a
-r--r--r--   1 me  admin    65K 23 mai  2022 libboost_random-mt.dylib
...
python python-3.x macos boost-python pyexiv2
1个回答
0
投票

我尝试过:

brew install exiv2

这似乎成功了。

© www.soinside.com 2019 - 2024. All rights reserved.