gpt4 book ai didi

python - Numpy 单元测试错误

转载 作者:行者123 更新时间:2023-12-04 18:45:51 28 4
gpt4 key购买 nike

我在 numpy 中有两个单元测试错误,我似乎无法破译:
我正在运行 Ubuntu 16.4

> Running unit tests for numpy
NumPy version 1.11.0
NumPy relaxed strides checking option: False
NumPy is installed in /usr/lib/python2.7/dist-packages/numpy
Python version 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]
nose version 1.3.

然后错误是:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/usr/lib/python2.7/dist-packages/numpy/core/tests/test_indexing.py", line 17, in <module>
cdll = np.ctypeslib.load_library('multiarray', np.core.multiarray.__file__)
File "/usr/lib/python2.7/dist-packages/numpy/ctypeslib.py", line 163, in load_library
raise OSError("no file with expected extension")
OSError: no file with expected extension

==================================================== =====================

错误:失败:OSError(没有具有预期扩展名的文件)
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/usr/lib/python2.7/dist-packages/numpy/tests/test_ctypeslib.py", line 11, in <module>
cdll = load_library('multiarray', np.core.multiarray.__file__)
File "/usr/lib/python2.7/dist-packages/numpy/ctypeslib.py", line 163, in load_library
raise OSError("no file with expected extension")
OSError: no file with expected extension

有谁知道可能是什么问题?

最佳答案

numpy 1.11.0 和 Ubuntu 16.04 发生了完全相同的错误。我将 numpy 升级到最新的 [sudo] pip install --upgrade numpy ,然后测试工作。

关于python - Numpy 单元测试错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41919952/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com