# Library PIL pour python ?

**URL:** <https://www.debian-fr.org/t/library-pil-pour-python/15402>\
**Category:** Programmation\
**Created:** [Février 20, 2016, 6:07 UTC](https://www.debian-fr.org/t/library-pil-pour-python/15402 "2016-02-20T18:07:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![panthere](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/p/5daacb/32.png) [@panthere](https://www.debian-fr.org/u/panthere)\
**Post date:** [Février 20, 2016, 6:07 UTC](https://www.debian-fr.org/t/library-pil-pour-python/15402/1 "2016-02-20T18:07:25Z")

</div>

hello  
je suis confronter a ce problème:

```auto
#!/usr/bin/env python
# -*- coding:Utf-8 -*-
from PIL import Image, ImageTk 
import Tkinter as Tk 
root = Tk.Tk() 

image = Image.open("/home/taz/Desktop/python/1.png") 
photo = ImageTk.PhotoImage(image) 
 
canvas = Tk.Canvas(root, width = image.size[0], height = image.size[1]) 
canvas.create_image(0,0, anchor = Tk.NW, image=photo)
canvas.pack() 
root.mainloop()

erreur
python '/home/taz/Desktop/python/comp_kernel_tk.py'
Traceback (most recent call last):
  File "/home/taz/Desktop/python/comp_kernel_tk.py", line 3, in <module>
    from PIL import Image, ImageTk
ImportError: cannot import name ImageTk
```

et donc j’ai fait un aptitude search python-pil qui donne rien quelqu’un qui est sou \*buntu l’a déja apparament:

```auto
||/ Nom Version Description
+++-====================-====================-========================================================
python-pil <néant> (aucune description n'est disponible)
```

je pourrait toujours aller chercher la lib a la mano seulement je voudrai utiliser une lib qui est dans synaptic et qui gère les jpg ou png  
car TK ne gère pas ce type de format ![:smt100](https://www.debian-fr.org/uploads/default/original/1X/e20554655a4f7df5ab9ef5e6f2d57f3875deb2d9.gif)

Merci d’avance

---

<div class="post-metadata">

**Author:** ![MisterFreez](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/m/bb73d2/32.png) [@MisterFreez](https://www.debian-fr.org/u/MisterFreez)\
**Post date:** [Février 20, 2016, 6:07 UTC](https://www.debian-fr.org/t/library-pil-pour-python/15402/2 "2016-02-20T18:07:26Z")

</div>

J’ai pas trouvé pil mais tu as python-gd.  
GD est pas mal pour l’avoir un peu utilisé en PHP.

---

<div class="post-metadata">

**Author:** ![panthere](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/p/5daacb/32.png) [@panthere](https://www.debian-fr.org/u/panthere)\
**Post date:** [Février 20, 2016, 6:07 UTC](https://www.debian-fr.org/t/library-pil-pour-python/15402/3 "2016-02-20T18:07:28Z")

</div>

erf j’avais mal chercher avec aptitude :

```auto

```

Merci 🙂
