I need to get PIL installed locally to test GAE's images api in my local environment.
I grabbed the PIL 1.1.6 installer for Mac, and when I go to select the destination (when installing), I get the error:
You cannot install PIL 1.1.6 on this volume.
PIL requires System Python 2.5 to install.
I have Python 2.5.x on this machine.
NOTE:
Added a bounty. I am in real need of a way to test the image API locally on my Mac.
That's quite easy:
sudo port install python25
sudo port install py25-pil
/opt/local/bin/python2.5
as Python Path *
* be sure to confirm it with an ENTER or it will not persist
I would install homebrew, and use that to install python2.7 (a requirement for pip
to work properly together with homebrew) and then use pip
to install PIL.
If you don't have macports or fink or something installed already, this is simple. If you do, you might want to look into removing it first (especially if they live in /usr/local
).
Installing homebrew: https://github.com/mxcl/homebrew/wiki/Installation
(If you have Xcode installed (you need a compiler) you can just use this one-liner, but I recommend you read the instructions first so you understand what it does.)
ruby -e "$(curl -fsSLk https://gist.github.com/raw/323731/install_homebrew.rb)"
Installing python 2.7:
brew install python
Just remember to add the homebrew python as well as your homebrew bin directory to the front of your $PATH
after installing (put this in your ~/.bashrc
):
export PATH=/usr/local/bin:/usr/local/Cellar/python/2.7.1/bin:$PATH
Installing PIL:
(it seems like my installation is linked against libjpeg
, so install that first)
brew install jpeg
pip install pil
There you go.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With