博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Pillow & OpenCV安装
阅读量:4683 次
发布时间:2019-06-09

本文共 1973 字,大约阅读时间需要 6 分钟。

Pillow & OpenCV安装
参考文档:
OpenCV安装请参看官方链接,安装略
环境:
macOS 10.12.1
Pillow 3.4
OpenCV 3.2

There is a bug reported for Pillow , which indicates that libjpeg and zlib are now as of Pillow 3.0.0. 

The  for Pillow on Linux give advice of how to install these packages. Note that not all of the following packages may be missing on your machine (comments suggest that only libjpeg8-dev is actually missing).

pip / PyPi (Pillow>3.4.2)

The  of Pillow are available on PyPi as  — the new standard packaging mechanism for Python. These prebuilt packages include all neccessary binary dependencies to allow Pillow to run and should be used if you want to install Pillow using PyPi

To use wheels, you need to have a version of pip>=1.4. If you are using an earlier version (pip --version) upgrade pip using the following:

pip install --upgrade pip

Once pip is upgraded, pip install will use platform-specific wheel files by default if they are available. Use the following command to upgrade Pillow to the latest version available on PyPi:

pip install --upgrade pillow

Mac OS X (via Homebrew)

On Mac OS X with  this can be fixed using:

brew install libjpeg zlib

You may also need to force-link zlib using the following:

brew link zlib --force

Thanks to Panos Angelopoulous and nelsonvarela in the comments.

Update 5th July 2016: In current versions of Homebrew the above may no longer work, as there is no longer a formula for zlib available in the main repository (Homebrew will prompt you to install lzlib which is a different library and will not solve this problem). 

There is a formula available in the dupes repository. You can either tap this repository, and install as normal:

brew tap homebrew/dupes 
brew install zlib

Or you can install zlib via xcode instead, as follows:

xcode-select --install

Thanks to benjaminz in the comments and Kal's answer below

After these are installed the pip installation of Pillow should work normally.

转载于:https://www.cnblogs.com/lixuebin/p/10813999.html

你可能感兴趣的文章
追加内容到指定的行
查看>>
编写高质量代码改善C#程序的157个建议——建议108:将类型标识为sealed
查看>>
sql常识-Join
查看>>
sqlplus连接远程数据库
查看>>
利用mask layer 勾View
查看>>
数据科学初学者九种常见错误
查看>>
SAS数据挖掘实战篇【一】
查看>>
SAS市场研究应用介绍:组合/联合分析
查看>>
python urllib urllib2
查看>>
L1-056 猜数字
查看>>
spring boot启动原理步骤分析
查看>>
Reverse Integer 旋转数字
查看>>
如何查看linux系统下的各种日志文件 linux 系统日志的分析大全
查看>>
MySQL中间件Atlas安装及使用
查看>>
LCA最近公共祖先-- HDU 2586
查看>>
IOS工作笔记(八)
查看>>
算法——插入排序
查看>>
VM上安装苹果虚拟机
查看>>
RHEL6 双网卡绑定
查看>>
mysqld 已死,但是 subsys 被锁
查看>>