17

I am working on a project that was developed using python 3.6 and I am using python 3.7 instead. I tried to run the tests that passed. However in the end I got a series of errors like this one:

Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/project/.eggs/scikit_learn-0.20.2-py3.7-macosx-10.13-x86_64.egg/sklearn/__init__.py", line 64, in <module>
    from .base import clone
  File "/project/.eggs/scikit_learn-0.20.2-py3.7-macosx-10.13-x86_64.egg/sklearn/base.py", line 10, in <module>
    import numpy as np
  File "/project/.eggs/numpy-1.16.0-py3.7-macosx-10.13-x86_64.egg/numpy/__init__.py", line 142, in <module>
    from . import core
  File "/project/.eggs/numpy-1.16.0-py3.7-macosx-10.13-x86_64.egg/numpy/core/__init__.py", line 16, in <module>
    from . import multiarray
  File "/project/.eggs/numpy-1.16.0-py3.7-macosx-10.13-x86_64.egg/numpy/core/multiarray.py", line 70, in <module>
    def empty_like(prototype, dtype=None, order=None, subok=None):
  File "/project/.eggs/numpy-1.16.0-py3.7-macosx-10.13-x86_64.egg/numpy/core/overrides.py", line 240, in decorator
    docs_from_dispatcher=docs_from_dispatcher)(implementation)
  File "/project/.eggs/numpy-1.16.0-py3.7-macosx-10.13-x86_64.egg/numpy/core/overrides.py", line 204, in decorator
    add_docstring(implementation, dispatcher.__doc__)
RuntimeError: empty_like method already has a docstring

Do you have any advice?

jmd_dk
  • 12,125
  • 9
  • 63
  • 94
amarchin
  • 2,044
  • 1
  • 16
  • 32
  • I also got this when installing my own package that depends on numpy and uses cython. Your error seems to be coming from sklearn which I'm guessing also has cython/C code linking to numpy. – djhoese Feb 18 '19 at 19:13
  • did you ever figure out your issue? After restarting my installation/documentation builds I no longer received this message. I'm wondering if it was a fluke or race condition or something. – djhoese Feb 18 '19 at 19:22
  • I've had the same error because I've forgot python setup.py build – Moonwalker Mar 31 '19 at 13:55
  • I got `RuntimeError: implement_array_function method already has a docstring` – Marc Maxmeister Jul 12 '19 at 21:59
  • This happens why I run `coverage run setup.py test` on a package but not when I use the package itself. – Marc Maxmeister Jul 25 '19 at 16:21

1 Answers1

1

According to Numpy's Github issues page, the errors the OP reported, as well as the other errors reported by the commenters were known Numpy bugs, that seem to have been solved by now.

João Amaro
  • 195
  • 1
  • 8