我正在使用python 3.6开发的项目中工作,而我使用的是python 3.7。我试图运行通过的测试。但是最后我遇到了一系列这样的错误:
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
您有什么建议吗?
这与numpy版本问题有关。请参考下面的链接以获取更多信息。
https://github.com/numpy/numpy/issues/14384
尝试将numpy降级到1.15.4版本,看看是否能解决问题。