国产精品一久久香蕉产线看-国产精品一区在线播放-国产精品自线在线播放-国产毛片久久国产-一级视频在线-一级视频在线观看免费

Mac OS系統上安裝Python的Pillow庫的教程

時間:2022-06-28 18:35:05 休閑雜談 我要投稿
  • 相關推薦

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/pip.log

  3. 所以就安裝pillow

  pip install --use-wheel Pillow

  Downloading/unpacking Pillow Downloading Pillow-2.4.0.zip (6.5MB): 5.0MB downloaded Cleaning up...

  弄了會別的回來發現還沒有下載完,這叫一個慢呀,于是放棄

  4. Git

  通過git下載源碼地址https://github.com/python-imaging/Pillow

  git clone https://github.com/python-imaging/Pillow.git

  然后開始編譯安裝

  4.1

  python setup.py 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 setup.py script. To check the build, run the selftest.py script.

  4.2 因為JPEG support not available,運行python selftest.py報告錯誤

  1 tests of 57 failed.

  于是只好卸載pillow

  可以通過pip命令來卸載

  pip uninstall pillow sudo pip uninstall pillow

  Password: Uninstalling Pillow: /Library/Python/2.7/site-packages/Pillow-2.4.0-py2.7-macosx-10.9-intel.egg /usr/local/bin/pilconvert.py /usr/local/bin/pildriver.py /usr/local/bin/pilfile.py /usr/local/bin/pilfont.py /usr/local/bin/pilprint.py 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 selftest.py -------------------------------------------------------------------- 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 setup.py install

主站蜘蛛池模板: 亚洲专区欧美 | 亚洲欧美人成人让影院 | 在线观看视频亚洲 | 377p亚洲欧洲日本大胆色噜噜 | 国产成人一区二区三区 | 国产日本欧美亚洲精品视 | 国产成人深夜福利在线观看 | 国产成人午夜精品影院游乐网 | 亚洲免费成人网 | 看黄网站在线观看 | 波多野结衣gvg | 一个人看的免费视频www免费 | 精品伊人久久大线蕉色首页 | 黄色在线观看视频网站 | 韩国伦理片在线观看 | 中文字幕日韩亚洲 | 欧洲一级毛片免费 | 亚洲午夜精品aaa级久久久久 | 亚洲最大福利视频网站 | 蜜桃日本一道无卡不码高清 | 色天天天天 | 2021国产精品自拍 | 色噜噜狠狠狠色综合久 | 久久国产亚洲欧美日韩精品 | 网站免费满18成年在线观看 | 最近免费中文字幕大全高清大全1 | 理论片黄色 | 久久久国产成人精品 | 黄色一级片免费 | 狠狠干很很操 | 在线免费观看www视频 | 欧美爽爽爽爽爽爽视频 | 亚洲精品欧美精品日韩精品 | 一二三四视频社区在线1 | 日韩亚洲综合精品国产 | 国内精自品线一区91 | 欧美怡红院免费的视频 | 国产精品免费aⅴ片在线观看 | 久久99久久精品97久久综合 | 看片久久 | 国产极品粉嫩 |