5

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!

Diego Navarro
  • 9,316
  • 3
  • 26
  • 33

2 Answers2

6

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
bool.dev
  • 17,508
  • 5
  • 69
  • 93
Diego Navarro
  • 9,316
  • 3
  • 26
  • 33
1

I use mkvirtualenv from virtualenvwrapper package to create virtual environments. The --system-site-packages option links the public packages installed on the system to the new virtual environment.

Atis
  • 184
  • 1
  • 7