macOS build fails on `brew link` command while pouring python-3.7.6_1.high_sierra.bottle.tar.gz

Hi,

Our macOS builds have started to fail with the error

The `brew link` step did not complete successfully

while pouring python-3.7.6_1.high_sierra.bottle.tar.gz.

Here’s a recent log showing the error:
https://travis-ci.org/appleseedhq/appleseed/jobs/649922008

Here’s the build script that leads to the error:

We’ve tried moving the block

brew upgrade python@2
brew link python@2

after the block

brew upgrade boost
brew upgrade qt
brew install boost-python embree llvm@6 lz4 openimageio openvdb xerces-c zlib

but that didn’t solve the problem.

Any idea? Nothing has changed on our end.

Any idea? This is blocking us…

The error message is pretty transparent that you need to brew unlink python@2 by hand as its links are blocking the progress of brew link python. Do that after updating metadata (brew update) but before upgrading python.

Alternatively, brew unlink python before updating the metadata.

Homebrew has moved the default Python in the python formula from 2 to 3 while Travis has the old 2 preinstalled.

I had this issue as well. In my case, installing graphviz pulled in python3.

brew unlink python@2

took care of my situation.

Hi, that worked, thanks!