[Tutor] Pygraphics crashed

eryksun eryksun at gmail.com
Fri May 17 06:56:29 CEST 2013


On Thu, May 16, 2013 at 6:15 PM, Jim Mooney <cybervigilante at gmail.com> wrote:
> How do I install PIL with easy-install? I used that once but forget
> how.  I seem to recall reading it installs a version that is Py native
> and doesn't choke on your OS. Or did I read that wrong?

I recommend pip instead of easy_install because it allows you to
easily uninstall.

First install distribute:
http://python-distribute.org/distribute_setup.py

Next install pip:
https://raw.github.com/pypa/pip/master/contrib/get-pip.py

Quickstart guide:
http://www.pip-installer.org/en/1.3.1/quickstart.html

On Windows, pip and easy_install are a bit limited. I gather that the
new Wheel package format (.whl) and compatibility tags should solve
the problem (see PEPs 427 and 425). The development version of pip
supports Wheel. As is, pip works just fine for installing pure Python
packages from source. easy_install also supports binary eggs, but I
dislike not having an easy way to uninstall. At least an exe/msi
installer lets you uninstall using the Windows control panel.

If you have a supported C compiler configured, you can use pip to
install packages that have self-contained C extensions (i.e. no
dependencies -- such as psutil or cython). Visual Studio [Express] is
recommended (2008 for 2.6-3.2; 2010 for 3.3), especially if C++ is
used, but MinGW-w64 can be made to work. The big problem here is
Windows lacks dependency management for installing libraries and
development files (headers and import libs) to known system locations.
So compiling an extension module that has dependencies needs to be
configured manually.

PIL has a lot of dependencies: libjpeg, libtiff, zlib, freetype2,
littleCMS, libwebp, and Tcl/Tk. Building it is a moderately
challenging process on Windows -- not really suited for a beginner.
Building NumPy/SciPy would be even more work since they need a Fortran
compiler, too. Fortunately for Windows users, Christoph Gohlke has
already done all the hard work for dozens of the most popular
packages.


More information about the Tutor mailing list