Does anyone knows how to install the python library pyexiv2 and/or Gexiv2 on Mac OSX, ideally on version 10.6.8 and in a virtualenv?
Asked
Active
Viewed 4,316 times
2 Answers
1
It's pretty simple with Homebrew package manager:
brew install exiv2 pyexiv2
If you're using Macports, it also has exiv2 formulas:
http://www.macports.org/ports.php?by=name&substr=exiv
--Edit--
A side note: I got segfault at "import pyexiv2". It turned out I have system Python 2.7.2 and homebrew Python 2.73 intalled at the same time. The problem disappeared after I uninstalled the brewed Python. Related info can be found here:

Glorfindel
- 21,988
- 13
- 81
- 109

X.Y.
- 13,726
- 10
- 50
- 63
-
Well, that was pretty easy actually. At the time of asking the question, I spent hours trying to install both pyexiv2 and Gexiv2 but did not succeed. Meanwhile, I reinstalled OSX so I guess my problems came from my installation. Thank you very much. – Apr 04 '13 at 17:39
-
2pyexiv2 being deprecated, any idea about Gexiv2 installation? – Apr 04 '13 at 17:41
-
1For Gexiv2, you can still install the exiv2 library with homebrew and macports. And you'll have to download gexiv2 source and compile. I failed at the 'make' step, got complaints about wrong libtool arguments. I guess some difference between Linux and Mac casused this. I needed exiv2 for a quick task to batch edit the exif timestamp, and pyexiv2 worked for me so I didn't spend more time dig into why gexiv2 failed. – X.Y. Apr 04 '13 at 20:15
-
1I would also like to make pyexiv2 work in a virtualenv env, do you know how to do that? – Apr 04 '13 at 21:51
-
1I manually copied the needed files and it works: `cp -r /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pyexiv2 /path_to_my_virtualenv/lib/python2.6/site-packages cp /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/libexiv2python.so /path_to_my_virtualenv/lib/python2.6/site-packages` – Apr 05 '13 at 07:12
-
This answer does not work in OSX Yosemite. I opened a new thread about this here http://apple.stackexchange.com/q/177659/15504 – Léo Léopold Hertz 준영 Mar 21 '15 at 12:04