解决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

参考教程


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM