diff --git a/build_tools/azure/install.sh b/build_tools/azure/install.sh index 1c76a7a4aa5d3..3bbc4b07a6f57 100755 --- a/build_tools/azure/install.sh +++ b/build_tools/azure/install.sh @@ -104,6 +104,12 @@ scikit_learn_install() { # Without openmp, we use the system clang. Here we use /usr/bin/ar # instead because llvm-ar errors export AR=/usr/bin/ar + # Make sure omp.h is not present in the conda environment, so that + # using an unprotected "cimport openmp" will make this build fail. At + # the time of writing (2023-01-13), on OSX, blas (mkl or openblas) + # brings in openmp so that you end up having the omp.h include inside + # the conda environment. + find $CONDA_PREFIX -name omp.h -delete -print fi if [[ "$UNAMESTR" == "Linux" ]]; then