Developing software in the Real World

Cannot find zlib headers on macOS 10.15 Catalina

My new MacBook Pro 16″ comes with Catalina and while setting up Python to develop rst2pdf, I discovered that Pillow wouldn’t install.

Looking through the long list of red text I came across:

Aha!

The way this was solved on the previous version of macOS (Mojave) was to use the macOS_SDK_headers_for_macOS_10.14.pkg installer to set up symlinks to header files from the old place to the new place.

This doesn’t work on Catalina, so we need to add the correct directory to the CPATH, but putting this in our .zshrc (or .baschrc if you upgraded from Mojave)

Restart your terminal and then Pillow along with any other package that requires zlib or other standard headers will now install.

Thoughts? Leave a reply

Your email address will not be published. Required fields are marked *