Results 1 to 9 of 9

Thread: can not start gnome tweak tool

  1. #1
    Join Date
    Mar 2011
    Beans
    71

    can not start gnome tweak tool

    Hello people

    I have ubuntu 11.10 64bit and running gnome shell. If you ever used gnome-shell, you will know what is gnome-tweak-tool
    Anyway, i can not run it. After i click on the icon, it loads few moments then stops. If i run by terminal i get this error:

    Traceback (most recent call last):
    File "/usr/bin/gnome-tweak-tool", line 22, in <module>
    import gi
    ImportError: No module named gi

    Please, help me

  2. #2
    Join Date
    Mar 2009
    Beans
    8

    Re: can not start gnome tweak tool

    I am having the same problem and need help as well~~

  3. #3
    Join Date
    Feb 2007
    Beans
    192

    Re: can not start gnome tweak tool

    First, I'll assume that you tried re-installing gnome-tweak-tool.

    Try typing 'python' (without quotes) in a terminal to bring up the command interpreter. At the command line type 'import gi' and see what errors you get. One source:

    http://askubuntu.com/questions/80448...ng-from-python
    Clevo/Sager i7-2670 | 8gb ram | ATI 6970 | SSD drive | [I] Ubuntu: 14.04 / 13.10 /

  4. #4
    Join Date
    Mar 2009
    Beans
    8

    Re: can not start gnome tweak tool

    Quote Originally Posted by Xgen View Post
    First, I'll assume that you tried re-installing gnome-tweak-tool.

    Try typing 'python' (without quotes) in a terminal to bring up the command interpreter. At the command line type 'import gi' and see what errors you get. One source:

    http://askubuntu.com/questions/80448...ng-from-python
    Thanks for the reply. Here is the error message


    Python 2.5.4 (r254:67916, May 24 2011, 11:02:02)
    [GCC 4.5.2] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import gi
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    ImportError: No module named gi
    >>>

  5. #5
    Join Date
    Feb 2007
    Beans
    192

    Re: can not start gnome tweak tool

    As a test, what happens when you 'gksu gedit /usr/bin/gnome-tweak-tool' and comment (#) the lines 'import gi' and 'gi.require_version("Gtk", "3.0")'? Save and try gnome-tweak-tool. Reverse changes and save if no results.
    Clevo/Sager i7-2670 | 8gb ram | ATI 6970 | SSD drive | [I] Ubuntu: 14.04 / 13.10 /

  6. #6
    Join Date
    Mar 2009
    Beans
    8

    Re: can not start gnome tweak tool

    Quote Originally Posted by Xgen View Post
    As a test, what happens when you 'gksu gedit /usr/bin/gnome-tweak-tool' and comment (#) the lines 'import gi' and 'gi.require_version("Gtk", "3.0")'? Save and try gnome-tweak-tool. Reverse changes and save if no results.
    gnome-tweak-tool
    Traceback (most recent call last):
    File "/usr/bin/gnome-tweak-tool", line 25, in <module>
    import gtweak
    ImportError: No module named gtweak

    The above is the error that I got when I comment out the import gi

  7. #7
    Join Date
    Mar 2009
    Beans
    8

    Re: can not start gnome tweak tool

    I notice python2.5.4 fail to import gi while python2.7 works... my question is how can I set my default python to use python2.7 instead of python2.5???



    laptop:/usr/bin$ ls -al python
    lrwxrwxrwx 1 root root 18 2012-01-18 15:41 python -> /usr/bin/python2.7

    laptop:/usr/bin$ ./python
    Python 2.7.2+ (default, Oct 4 2011, 20:06:09)
    [GCC 4.6.1] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import gi
    >>>

    laptop:/usr/bin$ python
    Python 2.5.4 (r254:67916, May 24 2011, 11:02:02)
    [GCC 4.5.2] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import gi
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    ImportError: No module named gi
    >>>

  8. #8
    Join Date
    Mar 2009
    Beans
    8

    Re: can not start gnome tweak tool

    Quote Originally Posted by thomaslcy View Post
    I notice python2.5.4 fail to import gi while python2.7 works... my question is how can I set my default python to use python2.7 instead of python2.5???



    laptop:/usr/bin$ ls -al python
    lrwxrwxrwx 1 root root 18 2012-01-18 15:41 python -> /usr/bin/python2.7

    laptop:/usr/bin$ ./python
    Python 2.7.2+ (default, Oct 4 2011, 20:06:09)
    [GCC 4.6.1] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import gi
    >>>

    laptop:/usr/bin$ python
    Python 2.5.4 (r254:67916, May 24 2011, 11:02:02)
    [GCC 4.5.2] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import gi
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    ImportError: No module named gi
    >>>
    Also, I figure out the system is not using the /usr/bin/python as the default python


    laptop:~$ /usr/bin/python
    Python 2.7.2+ (default, Oct 4 2011, 20:06:09)
    [GCC 4.6.1] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>>
    laptop:~$ which python
    /usr/local/bin/python


    so my question is how can I change it to point to the /usr/bin/python?

  9. #9
    Join Date
    Mar 2009
    Beans
    8

    Re: can not start gnome tweak tool

    OK.. finally fixed..

    My workaround solution is open up the "/usr/bin/gnome-tweak-tool" in a text editor and the modify the first command from

    #!/usr/bin/env python

    to

    #!/usr/bin/python


    and now it's using python2.7 to run this and everything seems working fine

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •