Fix your Xcode

Do all your system upgrades: I was on High Sierra and needed to upgrade the OS to 10.13.6 so had to install Xcode 10 to get the Command Line Tools

sudo trash /Library/Developer/CommandLineTools
xcode-select --install

After typing ‘accept’ you should be good to move forward

Install Bazel

Have to do

brew tap bazelbuild/tap
brew tap-pin bazelbuild/tap
brew install bazel

Lets check we are running a recent version

bazel version

0.17.2-homebrew should be good

Install SWIG

This one should be easy.

brew install swig

Download and build Tensorflow library

go get -d
cd ${GOPATH}/src/

So I picked a python path that pointed to my which python3 which I installed via the pkg (3.6.x) available at and said no to everything else.

bazel build -c opt //

Okay so if your system isn’t perfectly configured…you will get some errors…once you correct a step you missed above (or I missed) run bazel clean --expunge to freshen up the build environment.

sudo cp ${GOPATH}/src/*.so /usr/local/lib


export LD_LIBRARY_PATH=/usr/local/lib
export DYLD_LIBRARY_PATH=/usr/local/lib
go test -v