pyexiv2 with homebrew python 2.7.4 -


i have installed python (2.7.4) brew on macbook pro (10.7.5). installed exiv2 , pyexiv2 brew. when import pyexiv2 python interpreter, got following error :

fatal python error: interpreter not initialized (version mismatch?)

what should correct (considering not want remove brewed python suggested in thread: how install python library pyexiv2 , gexiv2 on osx 10.6.8?)

thanks lot advice !

after searching , looking @ few complicated solutions across web, found simple method solve problem, in homebrew wiki itself!

the root of problem boost dependency library, default links system python , not brewed python, wiki:

note e.g. the boost bottle built against system python , should brewed source make work brewed python. can happen when both python executables same version (e.g. 2.7.2). explanation python packages c-extensions (those have .so files) compiled against python binary/library may have been built different arch (e.g. apple's python still not pure 64bit). other things can go wrong, too. welcome dirty underworld of c.

(emphasis mine)

  1. so first uninstall dependency libraries , pyexiv2 with:

    brew rm $(brew deps pyexiv2) brew rm pyexiv2 
  2. then install boost source indicated here:

    brew install boost --build-from-source 

    note: building boost might take time, patient, took system 27.9 mins! (output below)

    usr/local/cellar/boost/1.54.0: 9865 files, 568m, built in 27.9 minutes 
  3. then reinstall pyexiv2 , dependencies:

    brew install pyexiv2 

that's it, importing pyexiv2 should work flawlessly.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -