我在之前运行的应用程序上有一个错误:
File "/usr/lib/python2.7/site-packages/cryptography/x509/__init__.py", line 7, in <module>
from cryptography.x509 import certificate_transparency
ImportError: cannot import name certificate_transparency密码库的版本是2.2.2,我让sue确认文件certificate_transparency.py存在于所需的文件夹中。上述问题的根源是什么?
pip 10.0.1 from /home/serj/.local/lib/python2.7/site-packages/pip (python 2.7)发布于 2018-07-13 11:21:55
我也有同样的问题,密码学出了点问题。试一试
sudo pip install --upgrade cryptography发布于 2020-07-24 22:12:26
我找到了一个简单的解决方案。但它需要对源代码进行更改。
import sys, os
sys.path.append(os.path.append('/usr/lib/python2.7/site-packages/cryptography/x509'))在/usr/lib/python2.7/site-packages/cryptography/x509/__init__.py中更改代码的
然后替换这一行(旧的行):from cryptography.x509 import certificate_transparency
使用这个(新行):import certificate_transparency
https://stackoverflow.com/questions/50506221
复制相似问题