简体   繁体   English

在安装了Xcode 4的Mac Snow Leopard上安装PIL的最佳方法是什么?

[英]What is the best way to install PIL on Mac Snow Leopard with Xcode 4 installed?

What is the best way to install PIL on Mac Snow Leopard with Xcode 4 installed? 在安装了Xcode 4的Mac Snow Leopard上安装PIL的最佳方法是什么? I have seen a lot of information about how difficult it is to install PIL on a Mac but nothing seems too definitive. 我已经看到了很多有关在Mac上安装PIL有多困难的信息,但是似乎没有什么定论。 is there any way to get it installed with the version of Python that comes with Snow Leopard or Xcode 4? 有什么方法可以将它安装在Snow Leopard或Xcode 4随附的Python版本中?

Install dependencies first 首先安装依赖项

JPG JPG格式

Download http://www.ijg.org/files/jpegsrc.v8c.tar.gz 下载http://www.ijg.org/files/jpegsrc.v8c.tar.gz

tar xzf jpegsrc.v8c.tar.gz 
cd jpeg*
./configure
make
sudo make install

Freetype 自由类型

from http://sourceforge.net/projects/freetype/files/ 来自http://sourceforge.net/projects/freetype/files/

download http://downloads.sourceforge.net/project/freetype/freetype2/2.4.4/freetype-2.4.4.tar.bz2 下载http://downloads.sourceforge.net/project/freetype/freetype2/2.4.4/freetype-2.4.4.tar.bz2

tar xjf freetype-2.4.4.tar.bz2
cd free*
./configure
make
sudo make install

LittleCMS 1.19 NOT 2.0+ LittleCMS 1.19不是2.0+

NOT this ----http:// downloads.sourceforge.net/project/lcms/lcms/2.1/lcms2-2.1.tar.gz 不是这个---- http://downloads.sourceforge.net/project/lcms/lcms/2.1/lcms2-2.1.tar.gz

Instead download http://downloads.sourceforge.net/project/lcms/lcms/1.19/lcms-1.19.tar.gz 而是下载http://downloads.sourceforge.net/project/lcms/lcms/1.19/lcms-1.19.tar.gz

tar xzf lcms-1.19.tar.gz
cd lcms*
./configure
make
sudo make install

Then install PIL 然后安装PIL

ARCHFLAGS="-arch i386 -arch x86_64" sudo pip install PIL

(or preferably within a virtualenv) (或最好在virtualenv内)

ARCHFLAGS="-arch i386 -arch x86_64" pip install PIL

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM