【问题标题】:Error trying to run pytest for the first time第一次尝试运行 pytest 时出错
【发布时间】:2019-04-06 15:10:47
【问题描述】:

我正在尝试学习如何使用 pytest,当我执行 pytest test_map_func.py(文件名)时,我收到以下错误:

Traceback (most recent call last):
  File "c:\users\coult\anaconda3\lib\site-packages\numpy\core\__init__.py", line 16, in <module>
    from . import multiarray
ImportError: DLL load failed: couldn't find the specified module (translated from spanish)

然后我得到很多目录列表和这段代码:

ImportError:
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.

Original error was: DLL load failed: couldn't find the specified module (translated from spanish)

感谢所有可以帮助我的人:-)

【问题讨论】:

标签: python python-3.x numpy anaconda pytest


【解决方案1】:

我刚刚做了以下事情,它起作用了(解决方案 100% 菜鸟):

pip 卸载 numpy pip install numpy

然后我再次运行我的测试文件并 TACHAN!它起作用了:D

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-10-07
    • 2020-07-13
    • 2020-11-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多