Author Topic: ModuleNotFoundError: No module named 'gtk'  (Read 1593 times)

0 Members and 1 Guest are viewing this topic.

Offline bhat

  • Newly Subscribed
  • *
  • Posts: 1
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 7
ModuleNotFoundError: No module named 'gtk'
« on: April 14, 2017, 11:05:03 am »
I installed anaconda4 and thereafter upgraded iPython (since some of my programs needed 2.7). Having done this, the "peppermint-settings-panel" throws an error every time I run it. Can some one please help sort?

Traceback (most recent call last):
  File "/usr/share/peppermint-settings-panel/", line 3, in <module>
    import gtk
ModuleNotFoundError: No module named 'gtk'

However, the Peppermint Settings Panel runs from the command prompt only when I sudo it - "$ sudo peppermint-settings-panel"
« Last Edit: April 14, 2017, 11:06:40 am by bhat »

Offline mac

  • Veteran
  • ****
  • Posts: 1088
  • Karma: 336
    • View Profile
  • Peppermint version(s): Peppermint 7-8-9
Re: ModuleNotFoundError: No module named 'gtk'
« Reply #1 on: April 14, 2017, 11:55:39 am »
Open your terminal and run the following command to set permissions...
Code: [Select]
sudo chown -R root:root /usr/share/peppermint-settings-panel

Don't know what to tell you about anaconda---not a gamer.  There are several here on the forum, though, and I'm sure one of them will be able to help you out, shortly...

Welcome to the forum, btw.

« Last Edit: April 14, 2017, 07:05:25 pm by mac »
Peppermint: Standing Out from the Cloud
Reg. Linux User #432835

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26452
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: ModuleNotFoundError: No module named 'gtk'
« Reply #2 on: April 14, 2017, 05:46:21 pm »
macs command above should read:
Code: [Select]
sudo chown -R root:root /usr/share/peppermint-settings-panel

What's the output from:
Code: [Select]
cat /usr/lib/python2.7/site-packages/pygtk.pth

If that file doesn't exist, try creating it:
Code: [Select]
sudo pluma /usr/lib/python2.7/site-packages/pygtk.pth
and make it read:-
Code: [Select]
SAVE the file and exit pluma.

reboot and test.

If that still doesn't work, you could try reinstalling python-gobject-2
Code: [Select]
sudo apt-get install --reinstall python-gobject-2
but if you've been messing with a new version of python, don't blame me if this breaks things more .. I'd also be very worried that other things haven't been screwed up too.

The thing that's baffling me is we already had Python 2.7 :-\
« Last Edit: April 14, 2017, 05:52:57 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint