Has anyone got this working on the PI yet ?
I've installed it using aptitude but when I run my script I get the error that
"ImportError : cannot import name ImageTk"
This is part of PIL, I've checked and the PIL folder is in the correct place:
/usr/lib/python2.5/site-packages/PIL/
but nothing seems to be happening, perhaps it's a path thing ? I'm new to Linux so not sure how to set that if I need to.
I've have had other errors for Tkinter etc. and successfully added those but this one just seems to refuse.
Re: Python Image Library (PIL)
Are you using the debian image? If so, you probably want PIL for python 2.6. Try python -V to check which version you are using.sorvad wrote:This is part of PIL, I've checked and the PIL folder is in the correct place:
/usr/lib/python2.5/site-packages/PIL/
Re: Python Image Library (PIL)
2.4,2.5 and 2.6 are in the Debain squeeze image. I did the check and it was using 2.6. So i copied the site-packages folder from 2.5 to 2.6 (as according to the PIL site the current version works for 2.5 and 2.6) but it made no difference. So still a bit puzzled. It does seem to be finding the image part of PIL but not imagetk, my line is
from PIL import image,imagetk
from PIL import image,imagetk
Re: Python Image Library (PIL)
You might need to install the python module Tkinter. I'm sorry but I can't remember the Debian package name off the top of my head. It will be something like python-tk. Do a search with :
Code: Select all
$ sudo aptitude search python ¦ grep tk
Re: Python Image Library (PIL)
Already installed tkinter successfully as it it was one of items needed by my project. I know it was successful as it was originally moaning that it wasn't there until I installed it.
Re: Python Image Library (PIL)
Right, I've sorted this, turns out there's a "python-imaging-tk" module that needs to be installed as well. In fact from a new install of Debian squeeze this appears to pull all the other required packages. I had to install xterm as well but then my project ran fine.