I'm trying to use gtk+ with python in Linux Mint 17. After trying the jhbuild method of building the gtk libraries for python, I tried to install from the Debian repositories and I tried to install with pip. Somewhere in the midst of that mess, I built two versions of gi for python. One of them sits in the /usr/local/lib/python2.7/dist-packages directory and the other in the /usr/lib/python2.7/dist-packages directory. When trying to import gi.repository, I get the error:
ImportError: /usr/lib/python2.7/dist-packages/gi/_gi.so: undefined symbol: PyUnicodeUCS4_FromUnicode
PyUnicodeUCS4_FromUnicode is defined in both the /usr/include/python2.7/unicodeobject.h file and in the /usr/local/python2.7 directory. How can I get python to find when importing gi.repository?