gensim icon indicating copy to clipboard operation
gensim copied to clipboard

AttributeError: 'dict' object has no attribute '__NUMPY_SETUP__'

Open icanhasmath opened this issue 3 years ago • 4 comments

Building gensim from source on Python 3.9 I consistently get this error:

  File "setup.py", line 108, in finalize_options
    __builtins__.__NUMPY_SETUP__ = False
AttributeError: 'dict' object has no attribute '__NUMPY_SETUP__'

My current workaround is this: https://github.com/RaRe-Technologies/gensim/blob/919b4154a5696a544b87f792992f25f5e4d59d3e/setup.py#L109

        try:
            __builtins__.__NUMPY_SETUP__ = False
        except AttributeError:
            print("Cannot set '__builtins__.__NUMPY_SETUP__ = False' This is not needed if numpy is already installed.")

icanhasmath avatar Aug 31 '21 16:08 icanhasmath

What platform?

mpenkov avatar Dec 04 '21 06:12 mpenkov

Windows.

icanhasmath avatar Dec 16 '21 04:12 icanhasmath

+1 same thing on mac M1

jaymegordo avatar Jul 08 '22 18:07 jaymegordo

Noting this thread may be relevant: https://github.com/pyvista/pyacvd/pull/23#issue-1298467701 They dropped the __builtins__.__NUMPY_SETUP__ as outdated.

icanhasmath avatar Jul 08 '22 21:07 icanhasmath