I searched a little bit but I couldn\'t find a tuto to use PIL with PyPy. According to PyPy\'s blog, PIL is supported.
I had no easy_install or pip installed, so followed the instructions in pip's documentation:
wget https://bootstrap.pypa.io/get-pip.py
pypy get-pip.py
pypy -m pip install pillow
I did this:
$ /opt/pypy-1.4.1/bin/virtualenv test
$ cd test
$ bin/pip install PIL
...
--------------------------------------------------------------------
PIL 1.1.7 SETUP SUMMARY
--------------------------------------------------------------------
version 1.1.7
platform linux2 2.5.2 (e503e483e9ac, Dec 21 2010, 12:02:29)
[PyPy 1.4.1]
--------------------------------------------------------------------
*** TKINTER support not available
--- JPEG support available
--- ZLIB (PNG/ZIP) support available
--- FREETYPE2 support available
*** LITTLECMS support not available
--------------------------------------------------------------------
...
$ bin/pypy
Python 2.5.2 (e503e483e9ac, Dec 21 2010, 12:02:29)
[PyPy 1.4.1] on linux2
>>>> import Image
>>>> im = Image.open('/path/to/file.jpg')
>>>> outfile = open('/path/to/file.png', 'wb')
>>>> im.save(outfile, 'png')
Worked like a charm. So do that. :)