Search code examples
pythonimagepython-2.7python-imaging-libraryexiv2

How to install GExiv2 on a virtualenv?


I installed this library with:

sudo apt-get install libexiv2-dev libgexiv2-2 gir1.2-gexiv2-0.4

And I was able to load the Python module:

from gi.repository import GExiv2

The problem comes with virtualenv. I need to use this library inside a virtualenv and I don't know how to install it, since there is no pip package for this.

I tried to make a symbolic link between the system wide installed library and the virtualenv lib folder with no results:

lrwxrwxrwx 1 dnavarro dnavarro   25 jul  4 15:42 girepository-1.0 -> /usr/lib/girepository-1.0

Thanks for your help!


Solution

  • Ok, I was looking a better solution, but finally I made a symbolic link inside my virtualenv lib directory and it imports GExiv2 without errors :

    $ cd virtualenv
    $ cd lib/python2.7/
    $ ln -s /usr/lib/python2.7/dist-packages/gi