Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing PIL (Python Imaging Library) in Win7 64 bits, Python 2.6.4

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).

like image 835
Rafael Almeida Avatar asked Jan 18 '10 18:01

Rafael Almeida


People also ask

How do I know if PIL is installed?

Step 2: To check if PIL is successfully installed, open up the python terminal by typing python3 in the terminal. This will open up the python3 interactive console now type the following command to check the current version of the PIL. This will output the currently installed version of the PIL.

How do I find my pillow in CMD?

Check pillow Version Windows To check which version of pillow is installed, use pip show pillow or pip3 show pillow in your Windows CMD, command line, or PowerShell.


1 Answers

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.

like image 148
Vicky T Avatar answered Sep 17 '22 23:09

Vicky T