簡體   English   中英

在Mac OS X上的python 2.7.10上安裝PIL 1.1.7失敗

[英]Install PIL 1.1.7 failed on python 2.7.10 on MAC OS X

當我嘗試在MAC OS X上的python 2.7.10上安裝PIL 1.1.7失敗時遇到以下錯誤

--------------------------------------------------------------------
PIL 1.1.7 SETUP SUMMARY
--------------------------------------------------------------------
 version       1.1.7
 platform      darwin 2.7.10 (default, Oct 23 2015, 19:19:21)
              [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)]
--------------------------------------------------------------------
--- TKINTER support available
*** JPEG support not available
--- ZLIB (PNG/ZIP) support available
*** FREETYPE2 support not available
*** LITTLECMS support not available
--------------------------------------------------------------------
 To add a missing option, make sure you have the required
 library, and set the corresponding ROOT variable in the
 setup.py script.

該消息ImportError: The _imagingft C module is not installed出現明顯 ,沒有安裝該庫freetype的時。 因此,要解決此錯誤,您需要安裝freetype並重新編譯PIL。

升級我的pip時,我遇到了類似的問題,這就是我所做的(Mac OS 10.11,python 2.7.11)。

首先,最好使用PIL 1.1.6,因為1.1.7在MAC OS X上的python 2.7上有很多問題。

以下是安裝PIL 1.1.6的方法:

1.下載PIl: http ://www.pythonware.com/products/pil/(ver1.1.6與python 2.7更兼容,ver1.1.7有很多問題)

2.在您的終端中運行此代碼(下載到您的下載目錄)

$ tar xvfz Imaging-1.1.6.tar.gz
$ cd Imaging-1.1.6
$ python setup.py install

3.使用'pip list'檢查您的PIL。如果您還安裝了枕頭,則只能使用其中之一。因此,如果您僅想使用PIL,請通過以下方式卸載枕頭

sudo -s    
pip uninstall pillow

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM