In use pyinstaller packaged code into exe file , the emergence No module named 'Crypto.Math' cause of the error should be: now the name changed.
The solution is:
pip uninstall crypto
pip uninstall pycryptodome
pip install pycryptodome
reference:
https://stackoverflow.com/questions/57713994/modulenotfounderror-no-module-named-crypto-math