Marc Cabana
Marc Cabana

Reputation: 9

Unable to install py3exiv2 in python on a MacBookPro

pip3 install py3exiv2 gives error:

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"

Download exiv2 libraries from https://exiv2.org/download.html and copy them in /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

Location of global libraries for Python on Mac? gives me the place to put exiv2 includes

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 Sonoma 14.5

I even try everything on this stackflow: Impossible to install py3exiv2 with pip?

Tried to download from github:

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

sudo python3 configure.py gives this error... Can't find libboost_python-3, use the option --libboost=FILE

So I installed boost-python3 but can't find the libboost_python-3 file!

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
...

Upvotes: 0

Views: 108

Answers (1)

kalbhayran
kalbhayran

Reputation: 1

I tried:

brew install exiv2

and that seemed to do the trick.

Upvotes: 0

Related Questions