解决macos 10.15 pillow安装失败问题,提示the headers or library files could not be found for zlib

问题描述:
当使用pip安装Pillow python3包时提示the headers or library files could not be found for zlib,原因是环境变量设置里找不到zip headers library files相关文件,所以编译失败导致的。

解决方法:
将对应的zip库文件路径设置到环境变量即可。

编辑.zshrc或者.bashrc将下面环境变量添加即可
export CPATH=`xcrun --show-sdk-path`/usr/include

参考教程

posted @ 2020-06-14 19:04  冬天之歌  阅读(4473)  评论(0编辑  收藏  举报