Python program running error Tracebackmost recent call last solution
Dingdu! Here is the compilation of Xiao Ah Woo's study course materials. A good memory is not as good as a bad pen. Today is also a day to make progress. Let's advance together!
1. Problem description
When using Python's third-party library, Crypto, when running the program, an error appears:
Traceback (most recent call last):
File "D:/WorkingLocation/PyCharmProjects/test1/DigitalSignatureAlgorithm.py", line 2, in <module>
from Crypto.Hash import SHA
ModuleNotFoundError: No module named 'Crypto'
About the project code:
Part of debugging information:
2. Try to solve the problem:
1. The first thing that comes to mind is to install the third-party library Crypto [practice here is not feasible]
打开Terminal
然后执行命令:pip install Crypto
发现已经成功安装了,但是项目运行还是出错。
Later, I tried to install pycrypto and found that the problem could not be solved:
2. Uninstall Crypto and pycrypto first, install the third-party library pycryptodome [practice is not feasible here]
Uninstall Crypto and pycrypto first
pip uninstall Crypto
pip uninstall pycrypto
Then install the third-party library pycryptodome
pip install pycryptodome
3. The final solution [practical feasible]
Find the storage path of crypto and modify the folder name crypto to Crypto
.
Here~ It
runs successfully!
Ending!
More course knowledge learning records will come later!
就酱,嘎啦!
Note:
1. Life is diligent, nothing is gained.
2. The
final solution for ModuleNotFoundError: No module named'Crypto' can be found in the blog post: https://www.cnblogs.com/tanghuang/p/9869092.html