如何使用自制软件在系统库中安装PIL? [英] How to install PIL in system library using homebrew?
问题描述
在新的SnowLeopard安装中,我想使用自制软件安装PIL.但是,该配方将PIL安装在地窖下而不是在/Library/Python/2.6/site-packages中.有没有办法更改安装目录?
In a new SnowLeopard install, I'd like to use homebrew to install PIL. However the recipe installs PIL under cellar instead of in /Library/Python/2.6/site-packages. Is there a way to change the install directory?
推荐答案
由于似乎没有接受的"方式将自制鸡蛋安装到系统站点程序包中,因此我最终要做的是:
Since there seems to be no "accepted" way of installing homebrew eggs into the system site-packages, here is what I ended up doing:
% brew install pil
% easy_install pip
% pip install pil
自制软件安装会获取并安装PIL的所有依赖项(尤其是jpeg).然后,稍后的easy_install在为系统站点程序包编译PIL时使用它们. Freetype支持未在易于安装"的版本中显示,但这对我而言很好.
The homebrew install grabs and installs all of PIL's dependencies (especially jpeg). The later easy_install then uses them when compiling PIL for the system site-packages. Freetype support doesn't show up in the "easy-installed" version, but that's fine for my purposes.
由于我的最初目标是为Web设计人员提供构建django开发环境的简单方法,所以安装未使用的自制PIL并不是真正的问题.
As my initial goal was to provide a simple way for a web designer to build a django development environment, having an unused homebrew PIL installed is not really a problem.
希望这对某人有帮助.仍然希望那里有更好的答案.
Hope this helps someone. Still hoping there's a better answer out there.
这篇关于如何使用自制软件在系统库中安装PIL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!