libreria instalar python-3.3 pillow

python-3.3 - instalar - python imaging



Usando almohada con Python 3 (2)

No estoy teniendo mucha suerte con Pillow with Python 3.3.2 y le agradecería alguna ayuda. Mi problema es que después de instalar Pillow, no puedo importar la imagen.

Mi configuración: Tengo instalado Linux Mint 16 (en una computadora portátil HP Pavilion dv7). Tengo Python 3.3.2+ instalado, y está funcionando bien. Tengo Python 2.7.5+ instalado, y está funcionando bien.

Lo que hice: seguí las instrucciones en http://pillow.readthedocs.org/en/latest/index.html para instalar Pillow v2.4.0 (horquilla PIL):

Comencé con:

~$ pip install Pillow

Instalé python-setuptools con:

~$ sudo apt-get install python-dev python-setuptools

y también, para python 3:

~$ sudo apt-get install python3-dev python3-setuptools

Instalé "requisitos previos en Ubuntu 12.04 LTS" por lo tanto:

~$ sudo apt-get install libtiff4-dev libjpeg8-dev zlib1g-dev / libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev python-tk

( Mint 16 se basa en Ubuntu 13.10, pero no encontré una lista de requisitos previos para ninguna versión posterior )

Qué sucedió: con python 2, la imagen importada funcionó y pude abrir una imagen .png y mostrarla. Pero con python 3, ''importar imagen'' no dio ''ningún módulo llamado Imagen'' y ''desde PIL importar Imagen'' dio ''ningún módulo llamado PIL''

Cualquier ayuda sería muy apreciada.


Después de mucho cavar, y como no ha habido ninguna otra respuesta, responderé a mi propia pregunta. Esto funciona para la instalación de almohadas para python3.4:

$ sudo apt-get install python3-dev python3-setuptools $ sudo apt-get install libtiff4-dev libjpeg8-dev zlib1g-dev / libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev python-tk $ sudo apt-get install python3-pip $ sudo pip3 install Pillow $ sudo apt-get install imagemagick $ sudo ln -s /usr/bin/display /usr/bin/xv

Luego en el shell interactivo python3.4 ingrese:

>>> from PIL import Image >>> im = Image.open("someimage.jpg") >>> im.show()

Y voilá, aparece la imagen!

Los sitios más útiles:

http://pillow.readthedocs.org/en/latest/installation.html

https://askubuntu.com/questions/427358/install-pillow-for-python-3

Python 3 es un lenguaje hermoso, y está llegando, pero instalar y usar su biblioteca de imágenes no debería ser tan difícil de hacer.


La razón por la que recibe este error es que no ha instalado correctamente el intérprete de Python o su carpeta PIP está mal colocada. Simplemente descargue un [nuevo intérprete] ( https://www.python.org/downloads/ )! y eres bueno para ir