from cryptography.hazmat.primitives import hashes ModuleNotFoundError: No module named 'cryptography' make[3]: *** [/home/lkuser/SDK/Hi3519DV500_SDK_V2.0.0.2/smp/a55_optee/mk/link.mk:121: 8aabf300-2450-11e4-abe2-9f02a5d5bc2f.ta] Error 1 make[3]: Leaving directory '/home/lkuser/SDK/Hi3519DV500_SDK_V2.0.0.2/smp/a55_linux/source/mpp/sample/optee/security_subsys/ta' make[2]: *** [Makefile:24: ta] Error 2 make[2]: Leaving directory '/home/lkuser/SDK/Hi3519DV500_SDK_V2.0.0.2/smp/a55_linux/source/mpp/sample/optee/security_subsys' make[1]: *** [Makefile:11: security_subsys] Error 2 make[1]: Leaving directory '/home/lkuser/SDK/Hi3519DV500_SDK_V2.0.0.2/smp/a55_linux/source/mpp/sample/optee' make: *** [Makefile:27: optee] Error 2
时间: 2023-08-13 18:02:37 浏览: 229
这个错误信息看起来是在编译 Hi3519DV500_SDK_V2.0.0.2 中的一个示例程序时出现的。错误信息的前面部分可能会有更多有用的信息,可以尝试查看。另外,这个错误看起来是缺少了 `cryptography` 模块,你需要安装这个模块或者更新它。你可以尝试在终端中运行 `pip install cryptography` 命令来安装它。如果你已经安装了这个模块,你可以尝试更新它,运行 `pip install --upgrade cryptography` 命令即可。
相关问题
File "/home/lkuser/SDK/Hi3519DV500_SDK_V2.0.0.2/smp/a55_optee/scripts/sign_encrypt.py", line 827, in load_ta_image ta_image = BinaryImage(args.inf, args.key) File "/home/lkuser/SDK/Hi3519DV500_SDK_V2.0.0.2/smp/a55_optee/scripts/sign_encrypt.py", line 343, in __init__ from cryptography.hazmat.primitives import hashes ModuleNotFoundError: No module named 'cryptography' make[3]: *** [/home/lkuser/SDK/Hi3519DV500_SDK_V2.0.0.2/smp/a55_optee/mk/link.mk:121: 8aabf300-2450-11e4-abe2-9f02a5d5bc2f.ta] Error 1 make[3]: Leaving directory '/home/lkuser/SDK/Hi3519DV500_SDK_V2.0.0.2/smp/a55_linux/source/mpp/sample/optee/security_subsys/ta' make[2]: *** [Makefile:24: ta] Error 2 make[2]: Leaving directory '/home/lkuser/SDK/Hi3519DV500_SDK_V2.0.0.2/smp/a55_linux/source/mpp/sample/optee/security_subsys' make[1]: *** [Makefile:11: security_subsys] Error 2 make[1]: Leaving directory '/home/lkuser/SDK/Hi3519DV500_SDK_V2.0.0.2/smp/a55_linux/source/mpp/sample/optee' make: *** [Makefile:27: optee] Error 2
这是一个编译错误,提示找不到名为 "cryptography" 的模块。你需要安装 "cryptography" 模块,可以使用 pip 工具来安装,运行以下命令:
```
pip install cryptography
```
如果你没有安装 pip 工具,需要先安装 pip 工具。具体方法可以参考 pip 官方文档。
python报错:Traceback (most recent call last): File "/Users/pengwen/Downloads/bancolombia_handle_missing_response_check-5464fe09-589d-4dac-86e1-372cfb18c608/lambda_function.py", line 1, in <module> import paramiko File "/Users/pengwen/Downloads/bancolombia_handle_missing_response_check-5464fe09-589d-4dac-86e1-372cfb18c608/paramiko/__init__.py", line 22, in <module> from paramiko.transport import SecurityOptions, Transport File "/Users/pengwen/Downloads/bancolombia_handle_missing_response_check-5464fe09-589d-4dac-86e1-372cfb18c608/paramiko/transport.py", line 91, in <module> from paramiko.dsskey import DSSKey File "/Users/pengwen/Downloads/bancolombia_handle_missing_response_check-5464fe09-589d-4dac-86e1-372cfb18c608/paramiko/dsskey.py", line 25, in <module> from cryptography.hazmat.primitives import hashes, serialization File "/Users/pengwen/Downloads/bancolombia_handle_missing_response_check-5464fe09-589d-4dac-86e1-372cfb18c608/cryptography/hazmat/primitives/serialization/__init__.py", line 16, in <module> from cryptography.hazmat.primitives.serialization.base import ( File "/Users/pengwen/Downloads/bancolombia_handle_missing_response_check-5464fe09-589d-4dac-86e1-372cfb18c608/cryptography/hazmat/primitives/serialization/base.py", line 9, in <module> from cryptography.hazmat.primitives.asymmetric.types import ( File "/Users/pengwen/Downloads/bancolombia_handle_missing_response_check-5464fe09-589d-4dac-86e1-372cfb18c608/cryptography/hazmat/primitives/asymmetric/types.py", line 7, in <module> from cryptography.hazmat.primitives.asymmetric import ( File "/Users/pengwen/Downloads/bancolombia_handle_missing_response_check-5464fe09-589d-4dac-86e1-372cfb18c608/cryptography/hazmat/primitives/asymmetric/dsa.py", line 10, in <module> from cryptography.hazmat.primitives.asymmetric import utils as asym_utils File "/Users/pengwen/Downloads/bancolombia_handle_missing_response_check-5464fe09-589d-4dac-86e1-372cfb18c608/cryptography/hazmat/primitives/asymmetric/utils.py", line 6, in <module> from cryptography.hazmat.bindings._rust import asn1 ImportError: dlopen(/Users/pengwen/Downloads/bancolombia_handle_missing_response_check-5464fe09-589d-4dac-86e1-372cfb18c608/cryptography/hazmat/bindings/_rust.abi3.so, 0x0002): tried: '/Users/pengwen/Downloads/bancolombia_handle_missing_response_check-5464fe09-589d-4dac-86e1-372cfb18c608/cryptography/hazmat/bindings/_rust.abi3.so' (not a mach-o file)
这个报错是由于导入 paramiko 库时出现了问题。具体可以看到报错信息中提到了 cryptography.hazmat.bindings._rust.abi3.so 这个文件,可能是该文件存在问题导致导入失败。
解决这个问题的方法是重新安装 cryptography 库。你可以尝试以下步骤:
1. 确保你的 Python 环境已经安装了 pip 工具,可以通过运行 `pip --version` 命令来检查。
2. 执行以下命令卸载 cryptography 库:
```
pip uninstall cryptography
```
3. 重新安装 cryptography 库:
```
pip install cryptography
```
重新安装后,尝试再次运行你的程序,看是否还会报相同的错误。希望能解决你的问题!如果还有其他问题,请随时提问。
阅读全文