I just ran into this issue using a pyenv installation on Mac. It seems like numpy.distutils
is trying to import distutils.msvccompiler
regardless of the OS. A quick fix is to go to the file:
your-python-installation/site-packages/numpy/distutils/mingw32ccompiler.py
and comment out this line:
distutils.msvccompiler import get_build_version as get_build_msvc_version