diff options
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/__init__.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/numpy/core/__init__.py b/numpy/core/__init__.py index e8719ca75..1ac850002 100644 --- a/numpy/core/__init__.py +++ b/numpy/core/__init__.py @@ -11,7 +11,18 @@ for envkey in ['OPENBLAS_MAIN_FREE', 'GOTOBLAS_MAIN_FREE']: if envkey not in os.environ: os.environ[envkey] = '1' env_added.append(envkey) -from . import multiarray + +try: + from . import multiarray +except ImportError: + msg = """ +Importing the multiarray numpy extension module failed. Most +likely you are trying to import a failed build of numpy. +If you're working with a numpy git repo, try `git clean -xdf` (removes all +files not under version control). Otherwise reinstall numpy. +""" + raise ImportError(msg) + for envkey in env_added: del os.environ[envkey] del envkey |