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)
时间: 2023-12-14 14:04:47 浏览: 228
Mac下anaconda中Spyder打开报错Traceback(most recent call last)…问题
5星 · 资源好评率100%
这个报错是由于导入 paramiko 库时出现了问题。具体可以看到报错信息中提到了 cryptography.hazmat.bindings._rust.abi3.so 这个文件,可能是该文件存在问题导致导入失败。
解决这个问题的方法是重新安装 cryptography 库。你可以尝试以下步骤:
1. 确保你的 Python 环境已经安装了 pip 工具,可以通过运行 `pip --version` 命令来检查。
2. 执行以下命令卸载 cryptography 库:
```
pip uninstall cryptography
```
3. 重新安装 cryptography 库:
```
pip install cryptography
```
重新安装后,尝试再次运行你的程序,看是否还会报相同的错误。希望能解决你的问题!如果还有其他问题,请随时提问。
阅读全文