我不能运行python runtests.py-v来测试numpy,它给了我版本问题

yfwxisqw  于 2023-05-22  发布在  Python
关注(0)|答案(1)|浏览(119)

我想在我的本地机器上运行numpy库的测试,但当我像这样简单地测试命令时

python runtests.py -v

我不断得到以下错误`

Building, see build.log...
Traceback (most recent call last):
  File "/media/ishaque/b2681382-1a01-486d-8f51-52e6a9a56864/open source/numpy/setup.py", line 47, in <module>
    raise RuntimeError(f'Cannot parse version {FULLVERSION}')
RuntimeError: Cannot parse version 0+untagged.32104.g2a66cbb

Build failed!

我有以下图书馆安装与有版本

attrs==23.1.0
charset-normalizer==3.1.0
coverage==7.2.3
Cython==0.29.34
hypothesis==6.24.1
iniconfig==2.0.0
mypy==0.981
mypy-extensions==1.0.0
numpy==1.24.3
packaging==23.1
pluggy==1.0.0
py==1.11.0
pytest==6.2.5
pytest-cov==3.0.0
pytz==2021.3
sortedcontainers==2.4.0
toml==0.10.2
tomli==2.0.1
typing_extensions==4.5.0

那么有谁能告诉我如何解决这个问题吗?
我已经测试了Python的版本,但它没有工作。

kkbh8khc

kkbh8khc1#

Numpy的setup.py首先检查存储库中的git标记,并搜索要使用的标记版本。如果不存在标签,它使用当前提交,这是untagged,因此错误。为了从主系统提取标签你必须运行

git pull upstream main --tags

Numpy 1.24.3在其documentation中还没有--tags标志,但将在下一个版本中。

相关问题