I'm trying to install said library for use with Python. I tried downloading the executable installer for Windows, which runs, but says it doesn't find a Python installation. Then tried registering (http://effbot.org/zone/python-register.htm) Python, but the script says it can't register (although the keys appear in my register).
Then I tried downloading the source package: I run the setup.py build and it works, but when I run setup.py install it says the following:
running install
running build
running build_py
running build_ext
building '_imaging' extension
error: Unable to find vcvarsall.bat
What can I do?
UPDATE (May 2014): Like said by some comments and answers, PIL is currently unmantained, and the way to go now is to use Pillow (https://pypi.python.org/pypi/Pillow/, pip install pillow
).
I've just had the same problem (with Python 2.7 and PIL for this versions, but the solution should work also for 2.6) and the way to solve it is to copy all the registry keys from:
to
Worked for me
solution found at the address below so credits should go there: http://effbot.slinkset.com/items/Adding_Python_Information_to_the_Windows_Registry
I found a working win7 binary here: Unofficial Windows Binaries for Python Extension Packages It's from Christoph Gohlke at UC Irvine. There are binaries for python 2.5, 2.6, 2.7 , 3.1 and 3.2 for both 32bit and 64 bit windows.
There are a whole lot of other compiled packages here, too.
Be sure to uninstall your old PILfirst. If you used easy_install:
easy_install -mnX pil
And then remove the egg in python/Lib/site-packages
Be sure to remove any other failed attempts. I had moved the _image dll into Python*.*/DLLs and I had to remove it.
http://www.lfd.uci.edu/~gohlke/pythonlibs/
press contrl F type Pillow‑2.4.0.win‑amd64‑py3.3.exe
then click and downloadd the 64 bit version
Pillow is a replacement for PIL, the Python Image Library, which provides image processing functionality and supports many file formats. Note: use
from PIL import Image
instead ofimport Image
. PIL‑1.1.7.win‑amd64‑py2.5.exe PIL‑1.1.7.win32‑py2.5.exe Pillow‑2.4.0.win‑amd64‑py2.6.exe Pillow‑2.4.0.win‑amd64‑py2.7.exe Pillow‑2.4.0.win‑amd64‑py3.2.exe Pillow‑2.4.0.win‑amd64‑py3.3.exe Pillow‑2.4.0.win‑amd64‑py3.4.exe Pillow‑2.4.0.win32‑py2.6.exe Pillow‑2.4.0.win32‑py2.7.exe Pillow‑2.4.0.win32‑py3.2.exe Pillow‑2.4.0.win32‑py3.3.exe Pillow‑2.4.0.win32‑py3.4.exeJust got this error msg on my 32 bit Windows - I read the FAQ here: http://pythonware.com/products/pil/faq.htm and this sort of indicates that Windows is funny. Looked again at install pg and downloaded the Windows executable for Python26 # Python Imaging Library 1.1.7 for Python 2.6 (Windows only) - and the _imaging module gets installed when you run this. Should solve problem. So you can't just do the python setup.py install routine on: Python Imaging Library 1.1.7 Source Kit (all platforms) (November 15, 2009).