Install horovod on MacOS

972 views Asked by At

After installing horovod via pip3 install horovod

I get an error:

ImportError: Extension horovod.tensorflow has not been built: /usr/local/lib/python3.7/site-packages/horovod/tensorflow/mpi_lib.cpython-37m-darwin.so not found
If this is not expected, reinstall Horovod with HOROVOD_WITH_TENSORFLOW=1 to debug the build error.

Also tried

pip3 uninstall horovod
HOROVOD_WITH_TENSORFLOW=1 pip3 install horovod

pip3 uninstall horovod
HOROVOD_WITHOUT_MPI=1 pip3 install horovod

but get the same error.

1

There are 1 answers

0
Travis Addair On

One tricky thing about Pip is that you need to specify --no-cache-dir to prevent it from reusing its "cached" version of the package (in your case, compiling Horovod with different installation flags. So try something like this:

HOROVOD_WITHOUT_MPI=1 HOROVOD_WITH_TENSORFLOW=1 pip3 install --no-cache-dir horovod

Specific to macOS, you need to make sure libuv is installed before installing Horovod with Gloo (without MPI):

brew install libuv