gpt4 book ai didi

python - unittest安装报错找不到满足要求的版本

转载 作者:太空狗 更新时间:2023-10-29 17:40:11 25 4
gpt4 key购买 nike

有人可以帮我解决这个错误信息吗:

Could not find a version that satisfies the requirement unittest

我安装了最新的 PythonPyCharm 并尝试安装包 unittest 但出现上述错误。到目前为止,我对 Python 的体验有点像 dll hell ......

最佳答案

如果你试过这个:

$ pip install unittest
Collecting unittest

Could not find a version that satisfies the requirement unittest (from versions: )
No matching distribution found for unittest

出现错误是正常的,因为unittest不是 Pypi 上的有效包。唯一可分发的是 unittest2-0.0.0.tar.gz 但名称不正确,应该是 unittest-0.0.0.tar.gz (没有“2 ”)。事实上,我认为这是一个错误,如果你想使用这个,你需要安装 unittest2 (这是 Python 2.6 的 unittest 的反向移植)。

但是 unittest是标准模块,不需要安装:

$ python -m unittest

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK

关于python - unittest安装报错找不到满足要求的版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46133254/

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