![](/img/trans.png)
[英]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.