[英]Is there an easy way to install Pillow on Mac OS X Mavericks Python 2.7?
[英]Install Pillow for Python 3.4 on Mac Os X Mavericks (10.9)
我想在Mac OS X 10.9上安装Python 3.4枕头(PIL叉子)。 我在网上搜索,但找不到安装它的方法。 任何想法 ?
我通过Homebrew安装了Python 2和Python 3:
Homebrew为Python 2.7.x提供了一个公式,为Python 3.x提供了一个公式。 它们没有冲突,因此都可以安装。 可执行
python
将始终指向2.x,而python3
始终指向3.x版本。
所以:
$ brew update
$ brew install python3
这也为Python 2提供了pip
为Python 3提供了pip3
。因此,您可以像下面那样安装Pillow :
$ brew install libtiff libjpeg webp little-cms2
$ pip3 install pillow
然后:
$ python3
Python 3.4.0 (default, Apr 9 2014, 11:51:10)
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.38)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from PIL import Image
>>> im = Image.open("image.png")
>>> im.show()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.