【发布时间】:2020-09-23 04:57:34
【问题描述】:
我们更新了一些 python pkgs 和模块
其中一个是 pkg cryptography
我们将密码系统从版本 cryptography (1.7.1) 更新为 cryptography (2.9.2)
但是当我们访问 python shell 时,我们得到ImportError: No module named cryptography.fernet
尽管安装了密码学
pip list |grep cryptography
cryptography (2.9.2)
来自 python 外壳
python
Python 2.7.5 (default, Sep 12 2018, 05:31:16)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from cryptography.fernet import Fernet
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named cryptography.fernet
注意 - 在之前的版本 cryptography (1.7.1) 上,一切正常
那么模块有什么问题呢?
注意同样的问题来自 python 脚本
import sys
import os
import base64
from cryptography.fernet import Fernet
.
.
.
【问题讨论】:
标签: python python-3.x python-2.7 pip rhel