You are not logged in.
Pages: 1
Well, im confused because im trying to run a python app, and i get this error:
Traceback (most recent call last):
File "/usr/lib/rename-to-exif-date/rename-to-exif-date.py", line 25, in <module>
import gtk
ImportError: No module named gtk
Which is the package in arch that would satisfy this?
It's supposed to be python-gtk2 (in ubuntu) but i see no package named like this in arch....
Offline
well, you might search for gtk:
pacman -Ss gtk
extra/pygtk
Last edited by linux-ka (2010-10-25 12:29:03)
Offline
I have that package installed, but i still get the same import error
extra/pygtk 2.22.0-3 [installed]
Python bindings for the GTK widget set
Offline
use "python2" and not "python"
Offline
I also have python2 installed:
extra/python2 2.7-2 [installed]
A high-level scripting language
More ideas?
Offline
Change the shebang of this script you wanna use from
#!/usr/bin/python
to one of these:
#!/usr/bin/env python2.7
#!/usr/bin/python2.7
EDIT:
or this one:
#!/usr/bin/env python2
#!/usr/bin/env python2
Last edited by linux-ka (2010-10-25 12:46:29)
Offline
#!/usr/bin/env python2 #!/usr/bin/env python2
Sorry for the late reply: I was not at home.
Tried this: not working neither.
I will pass you the link to the aur package, and see if that way someone can sort things out... is very light and does not have many dependencies: Only python and python-gtk
http://aur.archlinux.org/packages.php?ID=42159
Thanks, and i hope we get it to work!!
Last edited by Xi0N (2010-10-25 20:37:30)
Offline
The following should at least confirm if GTK is working properly with your version of Python.
python2
# then once the REPL loads
import pygtk
pygtk.require('2.0')
import gtk
If you get any errors just replace the first line above with "python2 -v" to get more detailed info.
Offline
I dont get any errors running those commands line by line...
Offline
the build that you point it out needs some modifications.
first of all, dependency from python to python2 then all .py needs a shebang modifications. 3rd modification is to modify python to python2 in rename-to-exif-date. New pkgbuild should look like:
pkgname=rename-to-exif-date
pkgver=0.1.0
pkgrel=2
pkgdesc="Rename the photos dropped on the window to the date and hour in which they were taken."
arch=('any')
url="http://mundogeek.net/rename-to-exif-date/"
license=(GPL)
depends=('python2')
source=(http://launchpadlibrarian.net/17370687/${pkgname}_$pkgver-2.tar.gz)
md5sums=('197be517220a4eb29e617625af254292')
build() {
cd "${srcdir}/${pkgname}-${pkgver}/"
sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
-e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
$(find ./ -name '*.py')
sed -i "s|python|python2|" rename-to-exif-date
make install DESTDIR=$pkgdir
}
Note that this is not tested at all and maybe some modifications are needed. But overall, this is what should look
Last edited by wonder (2010-10-25 21:20:59)
Give what you have. To someone, it may be better than you dare to think.
Offline
Thanks!!!!
I changed another thing, but without your help, i wouldn't have been able to get it working again...
At least, it installs and runs..... lets see if it also works..
Thank you!
Offline
It does not work.... i get some other problem now...
Traceback (most recent call last):
File "/usr/lib/rename-to-exif-date/rename-to-exif-date.py", line 63, in cb_drag_data_received
rename(path)
File "/usr/lib/rename-to-exif-date/rename-to-exif-date.py", line 83, in rename
tags = EXIF.process_file(img_file)
NameError: global name 'EXIF' is not defined
Offline
Pages: 1