安装Cryptodom时出错

2024-05-15 15:15:53 发布

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

我试着用

pip install pycryptodomex

一切都很顺利。但是当我试着用

^{pr2}$

它返回以下错误:

ERROR: test2 (Cryptodome.SelfTest.Protocol.test_KDF.scrypt_Tests)

Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\Cryptodome\SelfTest\Protocol\test_KDF.py", line 395, in test2
    output = scrypt(tv.P, tv.S, tv.dkLen, tv.N, tv.r, tv.p)
  File "C:\Python27\lib\site-packages\Cryptodome\Protocol\KDF.py", line 376, in scrypt
    raise ValueError("Error %X while running scrypt" % result)
ValueError: Error 2 while running scrypt

----------------------------------------------------------------------
Ran 22656 tests in 185.509s

FAILED (errors=1)
Traceback (most recent call last):
  File "C:\Python27\lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "C:\Python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Python27\lib\site-packages\Cryptodome\SelfTest\__main__.py", line 26, in <module>
    SelfTest.run(stream=sys.stdout, verbosity=1, config= {'slow_tests' : False })
  File "C:\Python27\lib\site-packages\Cryptodome\SelfTest\__init__.py", line 76, in run
    raise SelfTestError("Self-test failed", result)
Cryptodome.SelfTest.SelfTestError: ('Self-test failed', <unittest.runner.TextTestResult run=22656 errors=1 failures=0>)

Tags: runinpytestlibpackageslinesite