ho voluto iniziare a utilizzare Tkinter con Python e hanno seguente codice:ImportError: No module named _imagingtk
#!/usr/bin/python
from Tkinter import *
from PIL import ImageTk, Image
top = Tk()
dir(top)
top.title("Erstes Frame")
erstesFrame = Frame(top, height=250, width=250)
erstesFrame.pack_propagate(0)
erstesFrame.pack()
img = ImageTk.PhotoImage(Image.open("mario.gif"))
erstesBild = Label(erstesFrame, image = img)
erstesBild.pack()
top.mainloop()
Ma quando provo ad eseguirlo, semplicemente mi dà questo errore:
Traceback (most recent call last):
File "ToDoAPP.py", line 14, in <module>
img = ImageTk.PhotoImage(Image.open("mario.gif"))
File "/usr/local/lib/python2.7/dist-packages/PIL/ImageTk.py", line 116, in __init__
self.paste(image)
File "/usr/local/lib/python2.7/dist-packages/PIL/ImageTk.py", line 181, in paste
import _imagingtk
ImportError: No module named _imagingtk
Ho installato PIL con python-pip e il mio sistema operativo è ubuntu 12.04 e la mia versione python è 2.7.3
Può essere installato tramite pip? – dm76
@ dm76, scusate, non l'ho mai provato. Non ne sono sicuro. – falsetru
Ho già quel pacchetto, Versione: 2.6.1-2, e sto ancora ricevendo l'errore. – appas