Mac OS系統上安裝Python的Pillow庫的教程
1. 安裝pip
sudo easy_install pip
pip 安裝成功就可以直接安裝pil或者pillow
2. 通過命令pip install pil
pip install Pil
Downloading/unpacking Pil Could not find any downloads that satisfy the requirement Pil Some externally hosted files were ignored (use --allow-external Pil to allow). Cleaning up... No distributions at all found for Pil Storing debug log for failure in /Users/macbook/Library/Logs/
3. 所以就安裝pillow
pip install --use-wheel Pillow
Downloading/unpacking Pillow Downloading (6.5MB): 5.0MB downloaded Cleaning up...
弄了會別的'回來發現還沒有下載完,這叫一個慢呀,於是放棄
4. Git
通過git下載源碼地址
git clone
然後開始編譯安裝
4.1
python build_ext -i
編譯完之後會提示運行測試例子,並且發現JPEG support not available
-------------------------------------------------------------------- version Pillow 2.4.0 platform darwin 2.7.5 (default, Aug 25 2013, 00:04:04) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] -------------------------------------------------------------------- --- TKINTER support available *** JPEG support not available *** OPENJPEG (JPEG2000) support not available --- ZLIB (PNG/ZIP) support available *** LIBTIFF support not available --- FREETYPE2 support available *** LITTLECMS2 support not available *** WEBP support not available *** WEBPMUX support not available -------------------------------------------------------------------- To add a missing option, make sure you have the required library, and set the corresponding ROOT variable in the script. To check the build, run the script.
4.2 因爲JPEG support not available,運行python 報告錯誤
1 tests of 57 failed.
於是只好卸載pillow
可以通過pip命令來卸載
pip uninstall pillow sudo pip uninstall pillow
Password: Uninstalling Pillow: /Library/Python/2.7/site-packages/ /usr/local/bin/ /usr/local/bin/ /usr/local/bin/ /usr/local/bin/ /usr/local/bin/ Proceed (y/n)? y
成功之後需要安裝libjpeg的支持
brew install libjpeg
安裝成功之後重新編譯pillow
-------------------------------------------------------------------- version Pillow 2.4.0 platform darwin 2.7.5 (default, Aug 25 2013, 00:04:04) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] -------------------------------------------------------------------- --- TKINTER support available --- JPEG support available *** OPENJPEG (JPEG2000) support not available --- ZLIB (PNG/ZIP) support available *** LIBTIFF support not available --- FREETYPE2 support available *** LITTLECMS2 support not available *** WEBP support not available *** WEBPMUX support not available -------------------------------------------------------------------- python -------------------------------------------------------------------- Pillow 2.4.0 TEST SUMMARY -------------------------------------------------------------------- Python modules loaded from /Users/macbook/yyang/app-devel-source/python/Pillow/PIL Binary modules loaded from /Users/macbook/yyang/app-devel-source/python/Pillow/PIL -------------------------------------------------------------------- --- PIL CORE support ok --- TKINTER support ok --- JPEG support ok *** JPEG 2000 support not installed --- ZLIB (PNG/ZIP) support ok *** LIBTIFF support not installed --- FREETYPE2 support ok *** LITTLECMS2 support not installed *** WEBP support not installed -------------------------------------------------------------------- Running selftest: --- 57 tests passed.
最後執行安裝
sudo python install
-
有關Linux下快速安裝部署遠程連接軟件SSH的簡明教程介紹
SSH分爲客戶端和服務端。服務端是一個守護進程,一般是sshd進程,在後臺運行並響應來自客戶端的請求。提供了對遠程請求的處理,一般包括公共密鑰認證、密鑰交換、對稱密鑰加密和非安全連接。客戶端一般是ssh進程,另外還包含scp、slogin、sftp等其他進程。工作機制:1....
-
pe移動硬盤的簡單安裝教程
先準備好一些軟件:一個WINPE鏡像文件;GRUBGUI軟件,這個是用來給硬盤寫引導的;WINPM,分區工具。第一步,寫主引導:打開GRUBGUI這個程序,運行之後,選擇你的.移動硬盤,千萬不要選錯了啊,選成機子的硬盤就完了。當然了,重寫一下主引導就好了,也沒什麼大不了。寫了主引導之後,就...
-
大連話和煙臺話的區別
大連話最明顯的特徵就是沒有普通話的陰平55調,普通話的陰平調除了個別字讀成三聲調以外,大部分讀爲31或311.5(一種稍帶有拖音的降調)。以下內容是本站小編爲您精心整理的大連話與煙臺話之間的區別,歡迎參考!煙臺話介紹煙臺話,指的是在山東膠東半島煙臺地區廣泛使用...
-
小雞的剪紙教程圖解步驟
剪紙可是我們的傳統藝術之一啊,那麼,今天,小編給大家介紹的是小雞的剪紙教程圖解步驟,供大家閱讀參考。小雞的'剪紙教程圖解步驟:首先準備好剪紙材料,一張長方形的紙,一把剪刀,一支筆裁剪一張長方形的彩紙,然後把長方形的紙,左右對邊折再把紙張對摺一次,得到一個稍小的長...
相關文章
- 七年級英語下冊What time do you go to school?評課稿
- 關於暑假計劃英語作文:Plan for the Coming Summer Holiday
- MacBook Pro with Retina display 不適合做網頁設計嗎?
- 以HappyPrimarySchoolLife爲題的英語作文
- 葡萄牙語的歷史:Revolucionários apossam-se de Porto Alegre
- Could you tell me how to get to the National Stadium ?評課稿大綱
- 教材三年級起點第三冊Module8 Sports Day Unit1 What are you going to do
- 冀教版英語《Tomorrow We Will Work and Play》教學設計範文
- 解析cpu power limit control 主機BOIS裏的配置經驗
- i recall with embarrassing clarity the flavor of those particular ashes ?