You are not logged in.

#1 2010-10-19 12:03:35

Beefive
Member
Registered: 2010-07-30
Posts: 13

python and gtk

A lot of my python applications don't work since my last system upgrade. They don't start, and when I run them in the terminal I get something like this:

[jmy@x110 ~]$ bleachbit
Traceback (most recent call last):
  File "/usr/bin/bleachbit", line 41, in <module>
    import gtk
ImportError: No module named gtk
[jmy@x110 ~]$ 

I read somewhere that it might have something to do with multiple versions of python being installed, but I don't know.

[jmy@x110 ~]$ pacman -Q | grep py
dbus-python 0.83.1-2
gstreamer0.10-python 0.10.18-3
pycairo 1.8.10-2
pygobject 2.26.0-2
pygtk 2.22.0-3
python 3.1.2-2
python-feedparser 4.1-6
python-mygpoclient 1.4-2
python2 2.7-2
pyxdg 0.19-2
[jmy@x110 ~]$ 

Any ideas?

Offline

#2 2010-10-19 12:05:10

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: python and gtk

pacman -Si bleachbit
error: package 'bleachbit' was not found

that means you have to take care of it. You need to rebuild it because of pygtk.


Give what you have. To someone, it may be better than you dare to think.

Offline

#3 2010-10-19 12:09:34

Beefive
Member
Registered: 2010-07-30
Posts: 13

Re: python and gtk

wonder wrote:
pacman -Si bleachbit
error: package 'bleachbit' was not found

that means you have to take care of it. You need to rebuild it because of pygtk.

Tried reinstalling through yaourt, but I still get the same error message.

Offline

#4 2010-10-19 12:20:06

Foucault
Member
From: Athens, Greece
Registered: 2010-04-06
Posts: 214

Re: python and gtk

Quick and dirty: Locate bleachbit.py and change the first line from

#!/usr/bin/env python

to

#!/usr/bin/env python2

Offline

#5 2010-10-19 12:27:00

Beefive
Member
Registered: 2010-07-30
Posts: 13

Re: python and gtk

Foucault wrote:

Quick and dirty: Locate bleachbit.py and change the first line from

#!/usr/bin/env python

to

#!/usr/bin/env python2

Thank you. Though the thing is, about a third of all applications I use have the same error. Should I just do the same for every single one?

Offline

#6 2010-10-19 12:59:11

Foucault
Member
From: Athens, Greece
Registered: 2010-04-06
Posts: 214

Re: python and gtk

Ideally, the package maintainers of the apps you use (and are not in the standard repos, of course) should take care of that and fix their PKGBUILDS. So I believe you should leave a comment in AUR. However, if you can't wait for that to happen, then experiment with changing the #! line until the packages are updated.

Offline

#7 2010-10-20 11:51:40

TeoBigusDickus
Member
From: /Greece/Kastoria
Registered: 2010-05-29
Posts: 141

Re: python and gtk

I haven't installed Bleachbit, I just use it straight from its extracted folder.
So I fixed this problem by replacing

python bleachbit.py

with

python2 bleachbit.py

Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux!

Offline

Board footer

Powered by FluxBB