Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

After some not so clever editing of the default Python version in Ubuntu, from 2.7 to 3.2, I ended up breaking my entire system. After my computer imploded and everything stopped working, I tried to revert back my changes (by linking /usr/bin/python2.7 to /usr/bin/python and changing the default version in /usr/share/python/debian_defaults back to 2.7) but some things are still broken.

For example when I type "import gi" in the python interpreter I get the fallowing message :

>>> import gi
 Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 ImportError: No module named gi
>>> 

error which appears with some programs too (eg: gnome tweak tool). I have tried re-installing python both from the software center and from sources, but the same error persists.

Python -- version now returns :

 Python 2.7.2

and also some software packages which depend on python 2.7 are now working (for example the software center), but some things are still broken. Is there anything I can do to completely re-install python 2.7 as the default version?

share|improve this question
    
Have you tried to reinstall python-gobjects ? –  Javier Rivera Nov 18 '11 at 11:28
    
I did, but it re-installed "python-gobject 3.0.0-0ubuntu4". Is this the correct version number for 2.7? –  Colin Dumitru Nov 18 '11 at 11:34
    
Yes. It's the one installed on my system and it's working right. –  Javier Rivera Nov 18 '11 at 11:37
    
have you tried reconfiguring python i.e. sudo dpkg-reconfigure python2.7 ? –  sagarchalise Nov 18 '11 at 11:40
    
Yes, but the same error persists. –  Colin Dumitru Nov 18 '11 at 11:43

3 Answers 3

In my case:

>>> import gi
>>> gi.__file__
'/usr/lib/python2.7/dist-packages/gi/__init__.pyc'

So what you have to check if that you have that file available. If isn't then check that /usr/lib/python2.7/dist-packages/gi/__init__.py points /usr/share/pyshared/gi/__init__.py. You should have that file since you have python-gobject 3.0.0-0ubuntu4 (yes, I have the very same version).

If the gi package it's there, then you should have a look at your sys.path output. If /usr/lib/python2.7/dist-packages isn't included, then add it and try again.

Once the import works, you can just set your PYTHONPATH or investigate further on the reason why the path isn't correctly set.

The pending problem probably is either that your site.py file isn't valid for whatever reason or, more probably, that you're not getting the right site.py (it should be under /usr/lib/python2.7/). In that case have a look here to review all the directories python uses to look for that file and check that your environment is correct.

share|improve this answer

Increasing the verbosity of the interpreter goes a long way towards triaging this issue. Even after all that, I tried doing a simple symlink of the 2.7 dist-package to my usr/local 3.x dist-package and got a little further, but not by much.

 sudo ln -s /usr/lib/python2.7/dist-packages/gi/ /usr/local/lib/python3.2/dist-packages

~$ python3
Python 3.2.2+ (default, Feb 16 2012, 19:05:44) 
[GCC 4.6.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gi
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/local/lib/python3.2/dist-packages/gi/__init__.py", line 23, in 
    from ._gi import _API, Repository
ImportError: /usr/lib/libpyglib-gi-2.0-python2.7.so.0: undefined symbol: _Py_ZeroStruct

If you can track down that missing symbol you might be able to solve this problem. Here's all the verbose import output that led me this far. Also, this appears relevant: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=645963 , Good luck.

>>> import gi
# trying gi.cpython-32mu.so
# trying gimodule.cpython-32mu.so
# trying gi.abi3.so
# trying gimodule.abi3.so
# trying gi.so
# trying gimodule.so
# trying gi.py
# trying gi.pyc
# trying /usr/lib/python3.2/gi.cpython-32mu.so
# trying /usr/lib/python3.2/gimodule.cpython-32mu.so
# trying /usr/lib/python3.2/gi.abi3.so
# trying /usr/lib/python3.2/gimodule.abi3.so
# trying /usr/lib/python3.2/gi.so
# trying /usr/lib/python3.2/gimodule.so
# trying /usr/lib/python3.2/gi.py
# trying /usr/lib/python3.2/gi.pyc
# trying /usr/lib/python3.2/plat-linux2/gi.cpython-32mu.so
# trying /usr/lib/python3.2/plat-linux2/gimodule.cpython-32mu.so
# trying /usr/lib/python3.2/plat-linux2/gi.abi3.so
# trying /usr/lib/python3.2/plat-linux2/gimodule.abi3.so
# trying /usr/lib/python3.2/plat-linux2/gi.so
# trying /usr/lib/python3.2/plat-linux2/gimodule.so
# trying /usr/lib/python3.2/plat-linux2/gi.py
# trying /usr/lib/python3.2/plat-linux2/gi.pyc
# trying /usr/lib/python3.2/lib-dynload/gi.cpython-32mu.so
# trying /usr/lib/python3.2/lib-dynload/gimodule.cpython-32mu.so
# trying /usr/lib/python3.2/lib-dynload/gi.abi3.so
# trying /usr/lib/python3.2/lib-dynload/gimodule.abi3.so
# trying /usr/lib/python3.2/lib-dynload/gi.so
# trying /usr/lib/python3.2/lib-dynload/gimodule.so
# trying /usr/lib/python3.2/lib-dynload/gi.py
# trying /usr/lib/python3.2/lib-dynload/gi.pyc
# trying /usr/local/lib/python3.2/dist-packages/gi.cpython-32mu.so
# trying /usr/local/lib/python3.2/dist-packages/gimodule.cpython-32mu.so
# trying /usr/local/lib/python3.2/dist-packages/gi.abi3.so
# trying /usr/local/lib/python3.2/dist-packages/gimodule.abi3.so
# trying /usr/local/lib/python3.2/dist-packages/gi.so
# trying /usr/local/lib/python3.2/dist-packages/gimodule.so
# trying /usr/local/lib/python3.2/dist-packages/gi.py
# trying /usr/local/lib/python3.2/dist-packages/gi.pyc
# trying /usr/lib/python3/dist-packages/gi.cpython-32mu.so
# trying /usr/lib/python3/dist-packages/gimodule.cpython-32mu.so
# trying /usr/lib/python3/dist-packages/gi.abi3.so
# trying /usr/lib/python3/dist-packages/gimodule.abi3.so
# trying /usr/lib/python3/dist-packages/gi.so
# trying /usr/lib/python3/dist-packages/gimodule.so
# trying /usr/lib/python3/dist-packages/gi.py
# trying /usr/lib/python3/dist-packages/gi.pyc
Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named gi

The search path doesn't even look at the python2.7 path. Here's how it looks from the successful side of python2.7.

>>> import gi
# trying gi.so
# trying gimodule.so
# trying gi.py
# trying gi.pyc
# trying /usr/lib/python2.7/gi.so
# trying /usr/lib/python2.7/gimodule.so
# trying /usr/lib/python2.7/gi.py
# trying /usr/lib/python2.7/gi.pyc
# trying /usr/lib/python2.7/plat-linux2/gi.so
# trying /usr/lib/python2.7/plat-linux2/gimodule.so
# trying /usr/lib/python2.7/plat-linux2/gi.py
# trying /usr/lib/python2.7/plat-linux2/gi.pyc
# trying /usr/lib/python2.7/lib-tk/gi.so
# trying /usr/lib/python2.7/lib-tk/gimodule.so
# trying /usr/lib/python2.7/lib-tk/gi.py
# trying /usr/lib/python2.7/lib-tk/gi.pyc
# trying /usr/lib/python2.7/lib-dynload/gi.so
# trying /usr/lib/python2.7/lib-dynload/gimodule.so
# trying /usr/lib/python2.7/lib-dynload/gi.py
# trying /usr/lib/python2.7/lib-dynload/gi.pyc
# trying /usr/local/lib/python2.7/dist-packages/gi.so
# trying /usr/local/lib/python2.7/dist-packages/gimodule.so
# trying /usr/local/lib/python2.7/dist-packages/gi.py
# trying /usr/local/lib/python2.7/dist-packages/gi.pyc
import gi # directory /usr/lib/python2.7/dist-packages/gi
# trying /usr/lib/python2.7/dist-packages/gi/__init__.so
# trying /usr/lib/python2.7/dist-packages/gi/__init__module.so
# trying /usr/lib/python2.7/dist-packages/gi/__init__.py
# /usr/lib/python2.7/dist-packages/gi/__init__.pyc matches /usr/lib/python2.7/dist-packages/gi/__init__.py
import gi # precompiled from /usr/lib/python2.7/dist-packages/gi/__init__.pyc
# trying __future__.so
# trying __future__module.so
# trying __future__.py
# trying __future__.pyc
# trying /usr/lib/python2.7/__future__.so
# trying /usr/lib/python2.7/__future__module.so
# trying /usr/lib/python2.7/__future__.py
# /usr/lib/python2.7/__future__.pyc matches /usr/lib/python2.7/__future__.py
import __future__ # precompiled from /usr/lib/python2.7/__future__.pyc
# trying /usr/lib/python2.7/dist-packages/gi/_gi.so
dlopen("/usr/lib/python2.7/dist-packages/gi/_gi.so", 2);
import gi._gobject # directory /usr/lib/python2.7/dist-packages/gi/_gobject
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/__init__.so
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/__init__module.so
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/__init__.py
# /usr/lib/python2.7/dist-packages/gi/_gobject/__init__.pyc matches /usr/lib/python2.7/dist-packages/gi/_gobject/__init__.py
import gi._gobject # precompiled from /usr/lib/python2.7/dist-packages/gi/_gobject/__init__.pyc
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/sys.so
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/sysmodule.so
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/sys.py
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/sys.pyc
import gi._glib # directory /usr/lib/python2.7/dist-packages/gi/_glib
# trying /usr/lib/python2.7/dist-packages/gi/_glib/__init__.so
# trying /usr/lib/python2.7/dist-packages/gi/_glib/__init__module.so
# trying /usr/lib/python2.7/dist-packages/gi/_glib/__init__.py
# /usr/lib/python2.7/dist-packages/gi/_glib/__init__.pyc matches /usr/lib/python2.7/dist-packages/gi/_glib/__init__.py
import gi._glib # precompiled from /usr/lib/python2.7/dist-packages/gi/_glib/__init__.pyc
# trying /usr/lib/python2.7/dist-packages/gi/_glib/_glib.so
dlopen("/usr/lib/python2.7/dist-packages/gi/_glib/_glib.so", 2);
import gi._glib._glib # dynamically loaded from /usr/lib/python2.7/dist-packages/gi/_glib/_glib.so
# trying /usr/lib/python2.7/dist-packages/gi/_glib/option.so
# trying /usr/lib/python2.7/dist-packages/gi/_glib/optionmodule.so
# trying /usr/lib/python2.7/dist-packages/gi/_glib/option.py
# /usr/lib/python2.7/dist-packages/gi/_glib/option.pyc matches /usr/lib/python2.7/dist-packages/gi/_glib/option.py
import gi._glib.option # precompiled from /usr/lib/python2.7/dist-packages/gi/_glib/option.pyc
# trying /usr/lib/python2.7/dist-packages/gi/_glib/sys.so
# trying /usr/lib/python2.7/dist-packages/gi/_glib/sysmodule.so
# trying /usr/lib/python2.7/dist-packages/gi/_glib/sys.py
# trying /usr/lib/python2.7/dist-packages/gi/_glib/sys.pyc
# trying /usr/lib/python2.7/dist-packages/gi/_glib/optparse.so
# trying /usr/lib/python2.7/dist-packages/gi/_glib/optparsemodule.so
# trying /usr/lib/python2.7/dist-packages/gi/_glib/optparse.py
# trying /usr/lib/python2.7/dist-packages/gi/_glib/optparse.pyc
# trying optparse.so
# trying optparsemodule.so
# trying optparse.py
# trying optparse.pyc
# trying /usr/lib/python2.7/optparse.so
# trying /usr/lib/python2.7/optparsemodule.so
# trying /usr/lib/python2.7/optparse.py
# /usr/lib/python2.7/optparse.pyc matches /usr/lib/python2.7/optparse.py
import optparse # precompiled from /usr/lib/python2.7/optparse.pyc
# trying textwrap.so
# trying textwrapmodule.so
# trying textwrap.py
# trying textwrap.pyc
# trying /usr/lib/python2.7/textwrap.so
# trying /usr/lib/python2.7/textwrapmodule.so
# trying /usr/lib/python2.7/textwrap.py
# /usr/lib/python2.7/textwrap.pyc matches /usr/lib/python2.7/textwrap.py
import textwrap # precompiled from /usr/lib/python2.7/textwrap.pyc
# trying string.so
# trying stringmodule.so
# trying string.py
# trying string.pyc
# trying /usr/lib/python2.7/string.so
# trying /usr/lib/python2.7/stringmodule.so
# trying /usr/lib/python2.7/string.py
# /usr/lib/python2.7/string.pyc matches /usr/lib/python2.7/string.py
import string # precompiled from /usr/lib/python2.7/string.pyc
import strop # builtin
# trying gettext.so
# trying gettextmodule.so
# trying gettext.py
# trying gettext.pyc
# trying /usr/lib/python2.7/gettext.so
# trying /usr/lib/python2.7/gettextmodule.so
# trying /usr/lib/python2.7/gettext.py
# /usr/lib/python2.7/gettext.pyc matches /usr/lib/python2.7/gettext.py
import gettext # precompiled from /usr/lib/python2.7/gettext.pyc
# trying locale.so
# trying localemodule.so
# trying locale.py
# trying locale.pyc
# trying /usr/lib/python2.7/locale.so
# trying /usr/lib/python2.7/localemodule.so
# trying /usr/lib/python2.7/locale.py
# /usr/lib/python2.7/locale.pyc matches /usr/lib/python2.7/locale.py
import locale # precompiled from /usr/lib/python2.7/locale.pyc
import operator # builtin
# trying functools.so
# trying functoolsmodule.so
# trying functools.py
# trying functools.pyc
# trying /usr/lib/python2.7/functools.so
# trying /usr/lib/python2.7/functoolsmodule.so
# trying /usr/lib/python2.7/functools.py
# /usr/lib/python2.7/functools.pyc matches /usr/lib/python2.7/functools.py
import functools # precompiled from /usr/lib/python2.7/functools.pyc
import _functools # builtin
import _locale # builtin
# trying copy.so
# trying copymodule.so
# trying copy.py
# trying copy.pyc
# trying /usr/lib/python2.7/copy.so
# trying /usr/lib/python2.7/copymodule.so
# trying /usr/lib/python2.7/copy.py
# /usr/lib/python2.7/copy.pyc matches /usr/lib/python2.7/copy.py
import copy # precompiled from /usr/lib/python2.7/copy.pyc
# trying weakref.so
# trying weakrefmodule.so
# trying weakref.py
# trying weakref.pyc
# trying /usr/lib/python2.7/weakref.so
# trying /usr/lib/python2.7/weakrefmodule.so
# trying /usr/lib/python2.7/weakref.py
# /usr/lib/python2.7/weakref.pyc matches /usr/lib/python2.7/weakref.py
import weakref # precompiled from /usr/lib/python2.7/weakref.pyc
# trying org.so
# trying orgmodule.so
# trying org.py
# trying org.pyc
# trying /usr/lib/python2.7/org.so
# trying /usr/lib/python2.7/orgmodule.so
# trying /usr/lib/python2.7/org.py
# trying /usr/lib/python2.7/org.pyc
# trying /usr/lib/python2.7/plat-linux2/org.so
# trying /usr/lib/python2.7/plat-linux2/orgmodule.so
# trying /usr/lib/python2.7/plat-linux2/org.py
# trying /usr/lib/python2.7/plat-linux2/org.pyc
# trying /usr/lib/python2.7/lib-tk/org.so
# trying /usr/lib/python2.7/lib-tk/orgmodule.so
# trying /usr/lib/python2.7/lib-tk/org.py
# trying /usr/lib/python2.7/lib-tk/org.pyc
# trying /usr/lib/python2.7/lib-dynload/org.so
# trying /usr/lib/python2.7/lib-dynload/orgmodule.so
# trying /usr/lib/python2.7/lib-dynload/org.py
# trying /usr/lib/python2.7/lib-dynload/org.pyc
# trying /usr/local/lib/python2.7/dist-packages/org.so
# trying /usr/local/lib/python2.7/dist-packages/orgmodule.so
# trying /usr/local/lib/python2.7/dist-packages/org.py
# trying /usr/local/lib/python2.7/dist-packages/org.pyc
# trying /usr/lib/python2.7/dist-packages/org.so
# trying /usr/lib/python2.7/dist-packages/orgmodule.so
# trying /usr/lib/python2.7/dist-packages/org.py
# trying /usr/lib/python2.7/dist-packages/org.pyc
# trying /usr/lib/python2.7/dist-packages/PIL/org.so
# trying /usr/lib/python2.7/dist-packages/PIL/orgmodule.so
# trying /usr/lib/python2.7/dist-packages/PIL/org.py
# trying /usr/lib/python2.7/dist-packages/PIL/org.pyc
# trying /usr/lib/python2.7/dist-packages/gst-0.10/org.so
# trying /usr/lib/python2.7/dist-packages/gst-0.10/orgmodule.so
# trying /usr/lib/python2.7/dist-packages/gst-0.10/org.py
# trying /usr/lib/python2.7/dist-packages/gst-0.10/org.pyc
# trying /usr/lib/python2.7/dist-packages/gtk-2.0/org.so
# trying /usr/lib/python2.7/dist-packages/gtk-2.0/orgmodule.so
# trying /usr/lib/python2.7/dist-packages/gtk-2.0/org.py
# trying /usr/lib/python2.7/dist-packages/gtk-2.0/org.pyc
# trying /usr/lib/pymodules/python2.7/org.so
# trying /usr/lib/pymodules/python2.7/orgmodule.so
# trying /usr/lib/pymodules/python2.7/org.py
# trying /usr/lib/pymodules/python2.7/org.pyc
# trying /usr/lib/python2.7/dist-packages/ubuntu-sso-client/org.so
# trying /usr/lib/python2.7/dist-packages/ubuntu-sso-client/orgmodule.so
# trying /usr/lib/python2.7/dist-packages/ubuntu-sso-client/org.py
# trying /usr/lib/python2.7/dist-packages/ubuntu-sso-client/org.pyc
# trying /usr/lib/python2.7/dist-packages/ubuntuone-client/org.so
# trying /usr/lib/python2.7/dist-packages/ubuntuone-client/orgmodule.so
# trying /usr/lib/python2.7/dist-packages/ubuntuone-client/org.py
# trying /usr/lib/python2.7/dist-packages/ubuntuone-client/org.pyc
# trying /usr/lib/python2.7/dist-packages/ubuntuone-control-panel/org.so
# trying /usr/lib/python2.7/dist-packages/ubuntuone-control-panel/orgmodule.so
# trying /usr/lib/python2.7/dist-packages/ubuntuone-control-panel/org.py
# trying /usr/lib/python2.7/dist-packages/ubuntuone-control-panel/org.pyc
# trying /usr/lib/python2.7/dist-packages/ubuntuone-couch/org.so
# trying /usr/lib/python2.7/dist-packages/ubuntuone-couch/orgmodule.so
# trying /usr/lib/python2.7/dist-packages/ubuntuone-couch/org.py
# trying /usr/lib/python2.7/dist-packages/ubuntuone-couch/org.pyc
# trying /usr/lib/python2.7/dist-packages/ubuntuone-installer/org.so
# trying /usr/lib/python2.7/dist-packages/ubuntuone-installer/orgmodule.so
# trying /usr/lib/python2.7/dist-packages/ubuntuone-installer/org.py
# trying /usr/lib/python2.7/dist-packages/ubuntuone-installer/org.pyc
# trying /usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol/org.so
# trying /usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol/orgmodule.so
# trying /usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol/org.py
# trying /usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol/org.pyc
# trying struct.so
# trying structmodule.so
# trying struct.py
# trying struct.pyc
# trying /usr/lib/python2.7/struct.so
# trying /usr/lib/python2.7/structmodule.so
# trying /usr/lib/python2.7/struct.py
# /usr/lib/python2.7/struct.pyc matches /usr/lib/python2.7/struct.py
import struct # precompiled from /usr/lib/python2.7/struct.pyc
import _struct # builtin
# trying /usr/lib/python2.7/dist-packages/gi/_glib/gi.so
# trying /usr/lib/python2.7/dist-packages/gi/_glib/gimodule.so
# trying /usr/lib/python2.7/dist-packages/gi/_glib/gi.py
# trying /usr/lib/python2.7/dist-packages/gi/_glib/gi.pyc
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/constants.so
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/constantsmodule.so
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/constants.py
# /usr/lib/python2.7/dist-packages/gi/_gobject/constants.pyc matches /usr/lib/python2.7/dist-packages/gi/_gobject/constants.py
import gi._gobject.constants # precompiled from /usr/lib/python2.7/dist-packages/gi/_gobject/constants.pyc
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/_gobject.so
dlopen("/usr/lib/python2.7/dist-packages/gi/_gobject/_gobject.so", 2);
import gi._gobject._gobject # dynamically loaded from /usr/lib/python2.7/dist-packages/gi/_gobject/_gobject.so
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/propertyhelper.so
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/propertyhelpermodule.so
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/propertyhelper.py
# /usr/lib/python2.7/dist-packages/gi/_gobject/propertyhelper.pyc matches /usr/lib/python2.7/dist-packages/gi/_gobject/propertyhelper.py
import gi._gobject.propertyhelper # precompiled from /usr/lib/python2.7/dist-packages/gi/_gobject/propertyhelper.pyc
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/GTypeWrapper.so
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/GTypeWrappermodule.so
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/GTypeWrapper.py
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/GTypeWrapper.pyc
# trying datetime.so
# trying datetimemodule.so
# trying datetime.py
# trying datetime.pyc
# trying /usr/lib/python2.7/datetime.so
# trying /usr/lib/python2.7/datetimemodule.so
# trying /usr/lib/python2.7/datetime.py
# trying /usr/lib/python2.7/datetime.pyc
# trying /usr/lib/python2.7/plat-linux2/datetime.so
# trying /usr/lib/python2.7/plat-linux2/datetimemodule.so
# trying /usr/lib/python2.7/plat-linux2/datetime.py
# trying /usr/lib/python2.7/plat-linux2/datetime.pyc
# trying /usr/lib/python2.7/lib-tk/datetime.so
# trying /usr/lib/python2.7/lib-tk/datetimemodule.so
# trying /usr/lib/python2.7/lib-tk/datetime.py
# trying /usr/lib/python2.7/lib-tk/datetime.pyc
# trying /usr/lib/python2.7/lib-dynload/datetime.so
dlopen("/usr/lib/python2.7/lib-dynload/datetime.so", 2);
import datetime # dynamically loaded from /usr/lib/python2.7/lib-dynload/datetime.so
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/GTypeWrapper.so
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/GTypeWrappermodule.so
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/GTypeWrapper.py
# trying /usr/lib/python2.7/dist-packages/gi/_gobject/GTypeWrapper.pyc
import gi._gi # dynamically loaded from /usr/lib/python2.7/dist-packages/gi/_gi.so
share|improve this answer

Little workaround found here that worked for me:

sudo nano /usr/bin/gnome-tweak-tool

Change #!/usr/bin/env python to #!/usr/bin/python

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.