“RuntimeError:implement_array_函数方法已具有docstring”,正在尝试导入numpy。我如何解决这个问题?

2021-12-01 11:05:01 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试运行导入numpy的脚本,它显示以下错误:

Traceback (most recent call last):
  File "C:/Users/knaraghi/pycharm/ai_ems/ems-gym/examples/rllib_example_IKDG_system.py", line 5, in <module>
    import numpy as np
  File "C:\Users\knaraghi\pycharm\ai_ems\ems-gym\venv_ems-gym\lib\site-packages\numpy\__init__.py", line 142, in <module>
    from . import core
  File "C:\Users\knaraghi\pycharm\ai_ems\ems-gym\venv_ems-gym\lib\site-packages\numpy\core\__init__.py", line 24, in <module>
    from . import multiarray
  File "C:\Users\knaraghi\pycharm\ai_ems\ems-gym\venv_ems-gym\lib\site-packages\numpy\core\multiarray.py", line 14, in <module>
    from . import overrides
  File "C:\Users\knaraghi\pycharm\ai_ems\ems-gym\venv_ems-gym\lib\site-packages\numpy\core\overrides.py", line 47, in <module>
    """)
RuntimeError: implement_array_function method already has a docstring

Process finished with exit code 1

我用谷歌搜索了一下,结果是

  1. 这可能与多次导入numpy有关
  2. 它可能与python可能运行的一个名为usgwi的软件有关

我使用的是python 3.7和numpy 1.18.5

谢谢大家!