.net

.net

 

Mac下安装 PIL

   最近入手MacBook Pro 在配置PIL环境的时候遇到一些问题。现在把解决方式记录下来,希望对有需要的有所帮助。   

  1. 安装brew :  

    brew 又叫Homebrew,是Mac OSX上的软件包管理工具,能在Mac中方便的安装软件或者卸载软件, 只需要一个命令, 非常方便

    brew类似ubuntu系统下的apt-get的功能

    如何使用brew 可以参考园区的博客 http://www.cnblogs.com/TankXiao/p/3247113.html#brewinstall

    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

 

  2. 安装 freetype

    brew install freetype --universal

    修改链接

    ln -s /usr/local/include/freetype2 /usr/local/include/freetype

 

  3. 安装PIL

    sudo pip  install PIL --allow-external PIL --allow-unverified PIL

 

  如果碰到问题 error: command 'cc' failed with exit status 1

  这个是由于Mac 下执行脚本需要用 Xcode 这个软件。

  就先执行 xcode-select --install

 

posted on 2015-12-30 09:47  严杰  阅读(996)  评论(0编辑  收藏  举报

导航